Date: Sat, 13 May 2006 16:18:12 +0200 From: regisr <regisr@pobox.com> To: freebsd-ipfw@freebsd.org Subject: Re: [OK freebsd] Re: [OK freebsd] HEADSUP: IP6FW removed 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>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 13 May 2006 00:20:57 +0200 regisr <regisr@pobox.com> 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 <regisr> =20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060513161812.1ca90687.regisr>