Re: sys/netinet/ip_fw2.c fails to compile

From: Bjoern A. Zeeb <bzeeb-lists_at_lists.zabbadoz.net>
Date: Wed, 24 Dec 2003 08:32:27 +0000 (UTC)
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
_at__at_ -1915,7 +1915,7 _at__at_
 				    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/
Received on Tue Dec 23 2003 - 23:40:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:35 UTC