diff options
author | Hajimu UMEMOTO <ume@FreeBSD.org> | 2006-03-05 15:55:46 +0000 |
---|---|---|
committer | Hajimu UMEMOTO <ume@FreeBSD.org> | 2006-03-05 15:55:46 +0000 |
commit | c6ec022631120877cc41f3f0050172787636823e (patch) | |
tree | 69a16d73dba2d8828548939779788ec4845812e8 /sbin | |
parent | 36f7af5781f04f5826ad028966f5f22379102a33 (diff) |
Notes
Diffstat (limited to 'sbin')
-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 911af5c81977c..679b9809e8746 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 9ce30b84cd235..195e991b906da 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 */ |