summaryrefslogtreecommitdiffstats
path: root/sbin/ipfw
diff options
context:
space:
mode:
authormlaier <mlaier@FreeBSD.org>2005-05-21 03:27:33 +0000
committermlaier <mlaier@FreeBSD.org>2005-05-21 03:27:33 +0000
commitce2b072e9f6924afc8e43de7ce661b3f1642c441 (patch)
tree283f3a095aaa4ac1354b69048bcd26bc555fdcc2 /sbin/ipfw
parent8c89591e0a9e12622bf72f59fdd8e37176fa34fe (diff)
downloadFreeBSD-src-ce2b072e9f6924afc8e43de7ce661b3f1642c441.zip
FreeBSD-src-ce2b072e9f6924afc8e43de7ce661b3f1642c441.tar.gz
Unbreak handling of "ip[v]6" protocol and option flag. No more segfaults
and not every protocol is IPv6.
Diffstat (limited to 'sbin/ipfw')
-rw-r--r--sbin/ipfw/ipfw2.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index 1b44c35..4e3ce34 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -3511,7 +3511,7 @@ add_proto(ipfw_insn *cmd, char *av, u_char *proto)
; /* all done! */
else if ((pe = getprotobyname(av)) != NULL)
*proto = pe->p_proto;
- else if (strcmp(av, "ipv6") == 0 || strcmp(av, "ip6"))
+ else if (strcmp(av, "ipv6") == 0 || strcmp(av, "ip6") == 0)
*proto = IPPROTO_IPV6;
else
return NULL;
@@ -4433,7 +4433,6 @@ read_options:
case TOK_IPV6:
fill_cmd(cmd, O_IP6, 0, 0);
- ac--; av++;
break;
case TOK_EXT6HDR:
OpenPOWER on IntegriCloud