[OK freebsd] Re: [OK freebsd] HEADSUP: IP6FW removed
regisr
regisr at pobox.com
Sat May 13 14:18:15 UTC 2006
On Sat, 13 May 2006 00:20:57 +0200
regisr <regisr at pobox.com> a écrit:
> 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;
if (proto == IPPROTO_IPV6 || strcmp(av, "me6") == 0 ||
- inet_pton(AF_INET6, av, &a))
+ inet_pton(AF_INET6, av, &a) ||
+ strchr(av, ':') != strrchr(av, ':'))
return add_srcip6(cmd, av);
/* XXX: should check for IPv4, not !IPv6 */
if (proto == IPPROTO_IP || strcmp(av, "me") == 0 ||
@@ -3715,7 +3716,8 @@
struct in6_addr a;
if (proto == IPPROTO_IPV6 || strcmp(av, "me6") == 0 ||
- inet_pton(AF_INET6, av, &a))
+ inet_pton(AF_INET6, av, &a) ||
+ strchr(av, ':') != strrchr(av, ':'))
return add_dstip6(cmd, av);
/* XXX: should check for IPv4, not !IPv6 */
if (proto == IPPROTO_IP || strcmp(av, "me") == 0 ||
--
<regisr>
More information about the freebsd-ipfw
mailing list