Hi,

ipfilter version: 3.4.31
OS: FreeBSD 4.7-STABLE 2003/01/28

The following is a bug report I just submitted to freebsd.org, but I'm not
certian if the problem is really in the ip_filter code or the freebsd 4.7-STABLE
code. It seems that /usr/src/sys/netinet/ip_output.c has been changed in
4.7-STABLE as of 1/28/2003 or shortly before (1/24/2003 ?), and that
the function ip_output now requires a different number of arguments.

lines 119,120:
int
ip_output(m0, opt, ro, flags, imo, inp)

The rest of this email details what I seemed to find. A version of
ip_output.c from Nov 2002 has this:

int
ip_output(m0, opt, ro, flags, imo)

This resulted in this build error:

cc -Wall -Wstrict-prototypes -Wuninitialized -O -g -I../..    -DIPFILTER_LOG 
-DIPFILTER_LKM -Di386 -D__i386__ -DINET -DKERNEL -D_KERNEL -I/usr/include -I/sys 
-I/sys/sys -I/sys/arch  -DKLD_MODULE -I/sys -c ../../ip_proxy.c -o ip_proxy.o
cc -Wall -Wstrict-prototypes -Wuninitialized -O -g -I../..    -DIPFILTER_LOG 
-DIPFILTER_LKM -Di386 -D__i386__ -DINET -DKERNEL -D_KERNEL -I/usr/include -I/sys 
-I/sys/sys -I/sys/arch  -DKLD_MODULE -I/sys -c ../../ip_auth.c -o ip_auth.o
../../ip_auth.c: In function `fr_auth_ioctl':
../../ip_auth.c:425: too few arguments to function `ip_output'
*** Error code 1

Stop in /usr/local/src/ipfilter/ip_fil3.4.31/BSD/FreeBSD-4.7-STABLE-i386.
*** Error code 1


What was especially interesting (disturbing) was that I was unable to
compile ip_filter 3.4.28 anymore either. It seems pretty obvious why now...

Anyway, just letting someone know. Good luck. Thanks for ip_filter, it's
a great piece of software.

Thom O'Connor
[EMAIL PROTECTED]


================================

http://www.freebsd.org/cgi/query-pr.cgi?pr=47664
Problem Report kern/47664

change in ip_output.c in 4.7-STABLE seems to have broken ip_filter 3.4.31 build

Confidential
no Severity
non-critical Priority
medium Responsible
[EMAIL PROTECTED] State
open Class
sw-bug Submitter-Id
current-users Arrival-Date
Wed Jan 29 21:30:07 PST 2003 Last-Modified
never Originator
Charlie & <[EMAIL PROTECTED]> Release
FreeBSD 4.7-STABLE i386 Organization

Interludium

Environment

System: FreeBSD tweedy.interludium.com 4.7-STABLE FreeBSD 4.7-STABLE #1: Wed Jan 29 
14:08:30 PST 2003 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/TWEEDY i386




Description

Hi.

Got a build error building ip_filter 3.4.31, then went back and attempted to build an 
older version of
ip_filter (3.4.28), that for sure built fine before my cvsup of 4.7-STABLE on 
1/28/2003. Nothing appears
to have changed in the ip_filter code for ip_auth.c:

Here is the build error:

<snip>
cc -Wall -Wstrict-prototypes -Wuninitialized -O -g -I../..    -DIPFILTER_LOG 
-DIPFILTER_LKM -Di386 -D__i386__ -DINET -DKERNEL -D_KERNEL -I/usr/include -I/sys 
-I/sys/sys -I/sys/arch  -DKLD_MODULE -I/sys -c ../../ip_state.c -o ip_state.o
cc -Wall -Wstrict-prototypes -Wuninitialized -O -g -I../..    -DIPFILTER_LOG 
-DIPFILTER_LKM -Di386 -D__i386__ -DINET -DKERNEL -D_KERNEL -I/usr/include -I/sys 
-I/sys/sys -I/sys/arch  -DKLD_MODULE -I/sys -c ../../ip_proxy.c -o ip_proxy.o
cc -Wall -Wstrict-prototypes -Wuninitialized -O -g -I../..    -DIPFILTER_LOG 
-DIPFILTER_LKM -Di386 -D__i386__ -DINET -DKERNEL -D_KERNEL -I/usr/include -I/sys 
-I/sys/sys -I/sys/arch  -DKLD_MODULE -I/sys -c ../../ip_auth.c -o ip_auth.o
../../ip_auth.c: In function `fr_auth_ioctl':
../../ip_auth.c:425: too few arguments to function `ip_output'
*** Error code 1

Stop in /usr/local/src/ipfilter/ip_fil3.4.31/BSD/FreeBSD-4.7-STABLE-i386.
*** Error code 1

The ip_auth.c code that appears to be triggering this is:

#  if ((_BSDI_VERSION >= 199802) && (_BSDI_VERSION < 200005)) || \
       defined(__OpenBSD__) || (defined(IRIX) && (IRIX >= 605))
                        error = ip_output(m, NULL, &ro, IP_FORWARDING, NULL,
                                          NULL);
#  else
                        error = ip_output(m, NULL, &ro, IP_FORWARDING, NULL);
#  endif

It looks to me that the ip_output.c code was changed quite recently. From the /usr/sup 
file:

C src/sys/netinet/ip_output.c,v RELENG_4 . 2#871#110#10433850946#2584543#444 1.99.2.35 
2003.01.24.05.11.34 2#871#110#10438248515#540973#644

And the ip_output function in /usr/src/sys/netinet/ip_output.c seems to match the BSDI 
version above:

int
ip_output(m0, opt, ro, flags, imo, inp)

Looks like the ip_output.c code might have been suddenly changed, I guess? Perhaps 
this should really be
an ip_filter bug, I suppose, but it seems odd that older versions would suddenly be 
broken.

Unfortunately, I can't find a way to retrive an older version of the ip_output.c file 
to compare the source. But when I change the above ip_auth.c code to this, it does 
compile:

error = ip_output(m, NULL, &ro, IP_FORWARDING, NULL, NULL);

Good luck, cheers, thanks for all the hard work and great code over the years.

-thom


How-To-Repeat

# cvsup 4.7-STABLE (as of 1/28/2003)
# tar xvfz ip-fil3.4.31.tar.gz
# cd ip_fil3.4.31/
# make freebsd4


Fix

Probably change ip_auth.c in ip_filter as noted above. However, old versions of 
ip_filter now broken too.



Submit Followup | Raw PR

Reply via email to