summaryrefslogtreecommitdiff
path: root/sbin/pfctl/parse.y
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2003-02-19 21:54:47 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2003-02-19 21:54:47 +0000
commit0f036e1a4f7404ce4f3bd7108672f2b2912e26e8 (patch)
tree8073eba4451be579247322ce0ec0d8681c73a905 /sbin/pfctl/parse.y
parent45d210346c35691e748d8bc364eeaee89462f932 (diff)
better error message on icmp version / address family mismatch
ok markus@
Diffstat (limited to 'sbin/pfctl/parse.y')
-rw-r--r--sbin/pfctl/parse.y6
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index d3a90abcb2d..164e72ae1ef 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.323 2003/02/18 21:59:34 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.324 2003/02/19 21:54:46 henning Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -2735,7 +2735,9 @@ filter_consistent(struct pf_rule *r)
}
if ((r->proto == IPPROTO_ICMP && r->af == AF_INET6) ||
(r->proto == IPPROTO_ICMPV6 && r->af == AF_INET)) {
- yyerror("icmp version does not match address family");
+ yyerror("proto %s doesn't match address family %s",
+ r->proto == IPPROTO_ICMP ? "icmp" : "icmp6",
+ r->af == AF_INET ? "inet" : "inet6");
problems++;
}
if (r->keep_state == PF_STATE_MODULATE && r->proto &&