In some email I received from Mike F, sie wrote:
> Darren Reed wrote:
> > Ah, that'll be because the version you're using is too old to support it.
> > 
> > Download a later 3.4 from the web site, run BSD/kupgrade, build a new
> > kernel and do "make freebsd4 && make install-bsd" to sort things out.
> >                     ^^^^ s/freebsd4/netbsd
> > Darren
> 
> The fun continues... I fetched the latest 3.4.33 source, ran 
> BSD/kupgrade, and then proceeded to compile a new GENERIC 
> kernel. When it gets to the IPF bits, this is what happens:
[...]

That's easily enough patched (see below).

> For completeness's sake, I also did a 'make netbsd' in the IPF 
> source directory. It also stops with:
[...]
> In file included from /usr/include/machine/param.h:62,
>                   from /usr/include/sys/param.h:146,
>                   from ../../ip_fil.c:17:
> /usr/include/machine/cpu.h:77: machine/intr.h: No such file or 
> directory
> *** Error code 1

This is really strange and I put it down to some sort of problem with
the install.  Might be worth extracting /usr/include from base.tgz
again?

Darren

Index: fil.c
===================================================================
RCS file: /devel/CVS/IP-Filter/fil.c,v
retrieving revision 2.35.2.79
diff -c -r2.35.2.79 fil.c
*** fil.c       2003/12/04 14:34:09     2.35.2.79
--- fil.c       2004/03/24 21:26:20
***************
*** 230,235 ****
--- 230,238 ----
        if (v == 4) {
                fin->fin_id = ip->ip_id;
                fi->fi_tos = ip->ip_tos;
+ #if OpenBSD >= 200311 
+               ip->ip_off = ntohs(ip->ip_off);
+ #endif
                off = (ip->ip_off & IP_OFFMASK);
                (*(((u_short *)fi) + 1)) = (*(((u_short *)ip) + 4));
                fi->fi_src.i6[1] = 0;
***************
*** 244,249 ****
--- 247,255 ----
                fi->fi_fl = (hlen > sizeof(ip_t)) ? FI_OPTIONS : 0;
                if (ip->ip_off & (IP_MF|IP_OFFMASK))
                        fi->fi_fl |= FI_FRAG;
+ #if OpenBSD >= 200311 
+               ip->ip_len = ntohs(ip->ip_len);
+ #endif
                plen = ip->ip_len;
                fin->fin_dlen = plen - hlen;
        }
***************
*** 1392,1397 ****
--- 1398,1409 ----
                        (void) ipfr_fastroute(ip, mc, &mc, fin, &fr->fr_dif);
        }
  # endif /* !SOLARIS */
+ #if OpenBSD >= 200311 
+       if (pass & FR_PASS) {
+               ip->ip_len = htons(ip->ip_len);
+               ip->ip_off = htons(ip->ip_off);
+       }
+ #endif
        return (pass & FR_PASS) ? 0 : error;
  #else /* _KERNEL */
        if (pass & FR_NOMATCH)
***************
*** 2371,2377 ****
  # if SOLARIS
        qif_t *qf = fin->fin_qif;
  # endif
!       int out = fin->fin_out, dpoff, ipoff, inc = 0;
        char *ip;
  
        if (m == NULL)
--- 2383,2389 ----
  # if SOLARIS
        qif_t *qf = fin->fin_qif;
  # endif
!       int out = fin->fin_out, dpoff, ipoff;
        char *ip;
  
        if (m == NULL)
***************
*** 2386,2391 ****
--- 2398,2404 ----
        if (M_BLEN(m) < len) {
  # if SOLARIS
                qif_t *qf = fin->fin_qif;
+               int inc = 0;
  
                if (ipoff > 0) {
                        if ((ipoff & 3) != 0) {

Reply via email to