Date: Sun, 27 Nov 2005 05:30:08 GMT From: Hajimu UMEMOTO <ume@freebsd.org> To: freebsd-ipfw@FreeBSD.org Subject: Re: kern/89472: ipfw2 no longer supports filtering IPv6-over-IPv4 on 6.0-RELEASE Message-ID: <200511270530.jAR5U8NW035352@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/89472; it has been noted by GNATS. From: Hajimu UMEMOTO <ume@freebsd.org> To: gael.roualland@dial.oleane.com Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: kern/89472: ipfw2 no longer supports filtering IPv6-over-IPv4 on 6.0-RELEASE Date: Sun, 27 Nov 2005 14:20:37 +0900 Hi, >>>>> On Sun, 27 Nov 2005 05:10:15 GMT >>>>> Hajimu UMEMOTO <ume@freebsd.org> said: ume> Oops, please try this patch instead. Umm, the patch was encoded by quoted-printable wrongly. So, I've resend it. Index: sbin/ipfw/ipfw2.c diff -u -p sbin/ipfw/ipfw2.c.orig sbin/ipfw/ipfw2.c --- sbin/ipfw/ipfw2.c.orig Sat Aug 20 17:36:57 2005 +++ sbin/ipfw/ipfw2.c Sun Nov 27 13:19:40 2005 @@ -3596,7 +3596,7 @@ add_proto(ipfw_insn *cmd, char *av, u_ch *proto = IPPROTO_IP; - if (_substrcmp(av, "all") == 0) + if (_substrcmp(av, "all") == 0 || strcmp(av, "ip") == 0) ; /* do not set O_IP4 nor O_IP6 */ else if (strcmp(av, "ipv4") == 0 || strcmp(av, "ip4") == 0) /* explicit "just IPv4" rule */ @@ -3606,13 +3606,12 @@ add_proto(ipfw_insn *cmd, char *av, u_ch *proto = IPPROTO_IPV6; fill_cmd(cmd, O_IP6, 0, 0); } else if ((*proto = atoi(av)) > 0) - ; /* all done! */ - else if ((pe = getprotobyname(av)) != NULL) + fill_cmd(cmd, O_PROTO, 0, *proto); + else if ((pe = getprotobyname(av)) != NULL) { *proto = pe->p_proto; - else - return NULL; - if (*proto != IPPROTO_IP && *proto != IPPROTO_IPV6) fill_cmd(cmd, O_PROTO, 0, *proto); + } else + return NULL; return cmd; } Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511270530.jAR5U8NW035352>