]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Error if no ICMP type is specified even though user intended
authorYasuyuki KOZAKAI <yasuyuki@netfilter.org>
Tue, 13 Feb 2007 04:06:45 +0000 (04:06 +0000)
committerYasuyuki KOZAKAI <yasuyuki@netfilter.org>
Tue, 13 Feb 2007 04:06:45 +0000 (04:06 +0000)
to use icmp match.

extensions/libipt_icmp.c

index 8f22d052bad94a1e39d58c999cad4dd28ddba698..ce4683792c2b1c7577def88a8a90de0054465ac4 100644 (file)
@@ -284,6 +284,9 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match)
 /* Final check; we don't care. */
 static void final_check(unsigned int flags)
 {
+       if (!flags)
+               exit_error(PARAMETER_PROBLEM,
+                          "icmp match: You must specify `--icmp-type'");
 }
 
 static struct iptables_match icmp = {