From owner-freebsd-ipfw@FreeBSD.ORG Sat May 13 14:18:15 2006 Return-Path: X-Original-To: freebsd-ipfw@freebsd.org Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD27316A401 for ; Sat, 13 May 2006 14:18:15 +0000 (UTC) (envelope-from regisr@pobox.com) Received: from proof.pobox.com (proof.pobox.com [207.106.133.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58D4043D45 for ; Sat, 13 May 2006 14:18:15 +0000 (GMT) (envelope-from regisr@pobox.com) Received: from proof (localhost [127.0.0.1]) by proof.pobox.com (Postfix) with ESMTP id B858E24C32 for ; Sat, 13 May 2006 10:18:14 -0400 (EDT) Received: from crocoite.regix.info (regisr.net1.nerim.net [62.212.109.60]) by proof.sasl.smtp.pobox.com (Postfix) with ESMTP id 3208F4699B for ; Sat, 13 May 2006 10:18:13 -0400 (EDT) Date: Sat, 13 May 2006 16:18:12 +0200 From: regisr To: freebsd-ipfw@freebsd.org Message-Id: <20060513161812.1ca90687.regisr@pobox.com> In-Reply-To: <20060513002057.ad19b4a7.regisr@pobox.com> References: <54963.192.168.4.1.1147469253.squirrel@mail.abi01.homeunix.org> <20060513002057.ad19b4a7.regisr@pobox.com> X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.17; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [OK freebsd] Re: [OK freebsd] HEADSUP: IP6FW removed X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2006 14:18:15 -0000 On Sat, 13 May 2006 00:20:57 +0200 regisr a =E9crit: > bin/91245 : [patch] ipfw(8) sometimes treat ipv6 input as ipv4 > With the fix in the PR the rules with IPv6 addresses are accepted. The patch which is in the PR with new lines numbers ... --- sbin/ipfw/ipfw2.c.orig Sat May 13 15:55:14 2006 +++ sbin/ipfw/ipfw2.c Sat May 13 15:57:24 2006 @@ -3697,7 +3697,8 @@ struct in6_addr a; =20 if (proto =3D=3D IPPROTO_IPV6 || strcmp(av, "me6") =3D=3D 0 || - inet_pton(AF_INET6, av, &a)) + inet_pton(AF_INET6, av, &a) || + strchr(av, ':') !=3D strrchr(av, ':')) return add_srcip6(cmd, av); /* XXX: should check for IPv4, not !IPv6 */ if (proto =3D=3D IPPROTO_IP || strcmp(av, "me") =3D=3D 0 || @@ -3715,7 +3716,8 @@ struct in6_addr a; =20 if (proto =3D=3D IPPROTO_IPV6 || strcmp(av, "me6") =3D=3D 0 || - inet_pton(AF_INET6, av, &a)) + inet_pton(AF_INET6, av, &a) || + strchr(av, ':') !=3D strrchr(av, ':')) return add_dstip6(cmd, av); /* XXX: should check for IPv4, not !IPv6 */ if (proto =3D=3D IPPROTO_IP || strcmp(av, "me") =3D=3D 0 || --=20 =20