summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_icmp.c
diff options
context:
space:
mode:
author/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=yasuyuki/emailAddress=yasuyuki@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=yasuyuki/emailAddress=yasuyuki@netfilter.org>2006-07-04 10:23:26 +0000
committer/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=yasuyuki/emailAddress=yasuyuki@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=yasuyuki/emailAddress=yasuyuki@netfilter.org>2006-07-04 10:23:26 +0000
commit3307d25092efc4327ef7f5a6b5336b5cf69d9d2a (patch)
tree687a5b65458028e21582e40986b1f8822baedbc6 /extensions/libipt_icmp.c
parent860fe73b989d91ec9008a388db85e05548256312 (diff)
- force user to specify --icmpv6-type if icmpv6 match is required to load
- Don't allow multiple --icmp-type/icmpv6-type (Closes: #461)
Diffstat (limited to 'extensions/libipt_icmp.c')
-rw-r--r--extensions/libipt_icmp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/extensions/libipt_icmp.c b/extensions/libipt_icmp.c
index 9d45c8c..8f22d05 100644
--- a/extensions/libipt_icmp.c
+++ b/extensions/libipt_icmp.c
@@ -189,11 +189,15 @@ parse(int c, char **argv, int invert, unsigned int *flags,
switch (c) {
case '1':
+ if (*flags == 1)
+ exit_error(PARAMETER_PROBLEM,
+ "icmp match: only use --icmp-type once!");
check_inverse(optarg, &invert, &optind, 0);
parse_icmp(argv[optind-1], &icmpinfo->type,
icmpinfo->code);
if (invert)
icmpinfo->invflags |= IPT_ICMP_INV;
+ *flags = 1;
break;
default: