Date: Wed, 16 Aug 2006 19:35:52 +0200 From: Kees Plonsz <kees@jeremino.homeunix.net> To: freebsd-stable@freebsd.org Cc: David Malone <dwmalone@maths.tcd.ie>, mlaier@freebsd.org Subject: Re: identity crisis of 6-STABLE in ipfw ipv6 ? Message-ID: <200608161935.53019.kees@jeremino.homeunix.net> In-Reply-To: <20060816085353.GA96738@walton.maths.tcd.ie> References: <200608160813.21109.kees@jeremino.homeunix.net> <20060816085353.GA96738@walton.maths.tcd.ie>
next in thread | previous in thread | raw e-mail | index | archive | help
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. > > David. Your patch did not work on the ipfw2.c I did the patch by hand and it was o.k. after testing. Here is my diff: # diff -u ipfw2.c.orig ipfw2.c --- ipfw2.c.orig Mon Aug 7 21:32:57 2006 +++ ipfw2.c Wed Aug 16 19:11:21 2006 @@ -3793,10 +3793,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); @@ -3819,10 +3819,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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608161935.53019.kees>