]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Testsuite found an issue: multiport accepts -p ! tcp.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 3 Jan 2005 09:51:58 +0000 (09:51 +0000)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 3 Jan 2005 09:51:58 +0000 (09:51 +0000)
extensions/libipt_multiport.c

index 7442f94b82d8afdb97f2315d6a87d2b91762fb09..410a3906fa4a53d0684e6abcbf84759d7853e853 100644 (file)
@@ -144,6 +144,10 @@ init(struct ipt_entry_match *m, unsigned int *nfcache)
 static const char *
 check_proto(const struct ipt_entry *entry)
 {
+       if (entry->ip.invflags & IPT_INV_PROTO)
+               exit_error(PARAMETER_PROBLEM,
+                          "multiport only works with TCP or UDP");
+
        if (entry->ip.proto == IPPROTO_TCP)
                return "tcp";
        else if (entry->ip.proto == IPPROTO_UDP)