From 225f462b814a47394858b5994acdcc4f3c951a66 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 3 Jan 2005 09:51:58 +0000 Subject: Testsuite found an issue: multiport accepts -p ! tcp. --- extensions/libipt_multiport.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'extensions') diff --git a/extensions/libipt_multiport.c b/extensions/libipt_multiport.c index 7442f94b..410a3906 100644 --- a/extensions/libipt_multiport.c +++ b/extensions/libipt_multiport.c @@ -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) -- cgit v1.2.3