sys/netinet/ip_fw2.c fails to compile

Bjoern A. Zeeb bzeeb-lists at lists.zabbadoz.net
Wed Dec 24 00:40:12 PST 2003


On Wed, 24 Dec 2003, Maxim Konovalov wrote:

> On Tue, 23 Dec 2003, 09:10-0800, Sean McNeil wrote:
>
> > Hi folks,
> >
> > line 1918 of this file has a comparison against NULL when the function
> > ipsec_getnhist() appears to return int.  This causes a failure in my
> > build of -CURRENT.

echo $CFLAGS ?

> We should ask ume at .  ipsec_getnhist() prototype is a bit strange.

in all cases it returns an (int). I think this is because of the
change from ipsec_gethist which returned an struct ipsec_history * .

I must have missed it last time I asked for a change in ip_fw2.c after
I got the panic for the obsolete (and now removed ipsec_gethist).

so some patch like this looks ok to me:

--- src-20031223-01/sys/netinet/ip_fw2.c.orig	Tue Dec 23 20:25:20 2003
+++ src-20031223-01/sys/netinet/ip_fw2.c	Tue Dec 23 20:26:28 2003
@@ -1915,7 +1915,7 @@
 				    PACKET_TAG_IPSEC_IN_DONE, NULL) != NULL);
 #endif
 #ifdef IPSEC
-				match = (ipsec_getnhist(m) != NULL);
+				match = (ipsec_getnhist(m) != 0);
 #endif
 				/* otherwise no match */
 				break;

-- 
Bjoern A. Zeeb				bzeeb at Zabbadoz dot NeT
56 69 73 69 74				http://www.zabbadoz.net/


More information about the freebsd-current mailing list