identity crisis of 6-STABLE in ipfw ipv6 ?

Max Laier max at love2party.net
Wed Aug 16 14:31:14 UTC 2006


[ Kevin reported a similar problem on monday in "Lost IPv6 with ipfw in 
latest stable" - added to CC-list. ]

On Wednesday 16 August 2006 10:53, David Malone wrote:
> On Wed, Aug 16, 2006 at 08:13:20AM +0200, Kees Plonsz wrote:
> > I just updated to 6-STABLE but my ipfw rules stopped working.
> > It seems that "me6" is vanished into thin air.
> >
> > # ipfw add 7000 allow ip from me6 to me6
> > ipfw: hostname ``me6'' unknown
>
> I think it was broken by some missing brackets in this commit:
>
> 	http://www.freebsd.org/cgi/cvsweb.cgi/src/sbin/ipfw/ipfw2.c#rev1.88
>
> Can you try the patch below? If it looks good, Max or I can commit
> the fix.

Whichever you prefer.  Since I don't really use IPFW, I wouldn't mind to 
get rid of the task ;)  Note that I also MFCed 1.88 a couple of days ago.  
By the way, it's great to see actual IPv6 users ;)

David's patch:

Index: ipfw2.c
===================================================================
RCS file: /FreeBSD/FreeBSD-CVS/src/sbin/ipfw/ipfw2.c,v
retrieving revision 1.88
diff -u -r1.88 ipfw2.c
--- ipfw2.c	14 May 2006 03:53:04 -0000	1.88
+++ ipfw2.c	16 Aug 2006 08:50:04 -0000
@@ -3707,10 +3707,10 @@
 	    inet_pton(AF_INET6, host, &a))
 		ret = add_srcip6(cmd, av);
 	/* XXX: should check for IPv4, not !IPv6 */
-	if ((ret == NULL) && proto == IPPROTO_IP || strcmp(av, "me") == 0 ||
-	    !inet_pton(AF_INET6, host, &a))
+	if ((ret == NULL) && (proto == IPPROTO_IP || strcmp(av, "me") == 0 ||
+	    !inet_pton(AF_INET6, host, &a)))
 		ret = add_srcip(cmd, av);
-	if ((ret == NULL) && strcmp(av, "any") != 0)
+	if ((ret == NULL) && (strcmp(av, "any") != 0))
 		ret = cmd;
>
 	free(host);
@@ -3733,10 +3733,10 @@
 	    inet_pton(AF_INET6, host, &a))
 		ret = add_dstip6(cmd, av);
 	/* XXX: should check for IPv4, not !IPv6 */
-	if ((ret == NULL) && proto == IPPROTO_IP || strcmp(av, "me") == 0 ||
-	    !inet_pton(AF_INET6, av, &a))
+	if ((ret == NULL) && (proto == IPPROTO_IP || strcmp(av, "me") == 0 ||
+	    !inet_pton(AF_INET6, av, &a)))
 		ret = add_dstip(cmd, av);
-	if ((ret == NULL) && strcmp(av, "any") != 0)
+	if ((ret == NULL) && (strcmp(av, "any") != 0))
 		ret = cmd;
 
 	free(host);

-- 
/"\  Best regards,                      | mlaier at freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier at EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20060816/292d0274/attachment.pgp


More information about the freebsd-stable mailing list