[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pfctl 'invalid netmask' error slightly improved
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: pfctl 'invalid netmask' error slightly improved
- From: Daniel Hartmeier <daniel_(_at_)_benzedrine_(_dot_)_cx>
- Date: Thu, 30 Sep 2004 17:22:19 +0200
This helps spot the culprit, like when SPEWS lists a /244...
Daniel
Index: pfctl_parser.c
===================================================================
RCS file: /cvs/src/sbin/pfctl/pfctl_parser.c,v
retrieving revision 1.205
diff -u -r1.205 pfctl_parser.c
--- pfctl_parser.c 27 Sep 2004 12:51:12 -0000 1.205
+++ pfctl_parser.c 30 Sep 2004 15:20:07 -0000
@@ -1224,7 +1224,7 @@
if ((p = strrchr(s, '/')) != NULL) {
mask = strtol(p+1, &q, 0);
if (!q || *q || mask > 128 || q == (p+1)) {
- fprintf(stderr, "invalid netmask\n");
+ fprintf(stderr, "invalid netmask '%s'\n", p);
return (NULL);
}
if ((ps = malloc(strlen(s) - strlen(p) + 1)) == NULL)
Visit your host, monkey.org