diff options
-rw-r--r-- | sbin/ipfw/ipfw.8 | 2 | ||||
-rw-r--r-- | sbin/ipfw/ipfw2.c | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/sbin/ipfw/ipfw.8 b/sbin/ipfw/ipfw.8 index 911af5c..679b980 100644 --- a/sbin/ipfw/ipfw.8 +++ b/sbin/ipfw/ipfw.8 @@ -845,8 +845,6 @@ Matches any packet. .El .Pp The -.Cm ip -and .Cm ipv6 in .Cm proto diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index 9ce30b8..195e991 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -3590,8 +3590,8 @@ add_proto0(ipfw_insn *cmd, char *av, u_char *protop) char *ep; int proto; - proto = strtol(av, &ep, 0); - if (*ep != '\0' || proto < 0) { + proto = strtol(av, &ep, 10); + if (*ep != '\0' || proto <= 0) { if ((pe = getprotobyname(av)) == NULL) return NULL; proto = pe->p_proto; @@ -3607,7 +3607,7 @@ add_proto(ipfw_insn *cmd, char *av, u_char *protop) { u_char 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, "ip4") == 0) /* explicit "just IPv4" rule */ |