From owner-freebsd-stable@FreeBSD.ORG Wed Aug 16 15:10:57 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB1AC16A4DF; Wed, 16 Aug 2006 15:10:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9AFCF43D53; Wed, 16 Aug 2006 15:10:56 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id k7GFAivS039350; Wed, 16 Aug 2006 11:10:50 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-stable@freebsd.org Date: Wed, 16 Aug 2006 10:57:02 -0400 User-Agent: KMail/1.9.1 References: <200608160813.21109.kees@jeremino.homeunix.net> <20060816085353.GA96738@walton.maths.tcd.ie> In-Reply-To: <20060816085353.GA96738@walton.maths.tcd.ie> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608161057.03335.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [192.168.0.1]); Wed, 16 Aug 2006 11:10:50 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/1669/Wed Aug 16 07:54:21 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: David Malone , mlaier@freebsd.org, Kees Plonsz Subject: Re: identity crisis of 6-STABLE in ipfw ipv6 ? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Aug 2006 15:10:57 -0000 On Wednesday 16 August 2006 04: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. Note that the strcmp() != 0 doesn't need extra ()'s as != is higher than && in precedence. Operator Associativity -------- ------------- ... == != left to right ... && left to right || left to right > 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); > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > -- John Baldwin