Skip to contentSkip to conversation

ipt_multiport invert fix

PATCH Applied Harald Welte 2 participants 2 messages Jan 9, 2003 – Jan 10, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipt_multiport invert fix

Hi Dave!

This is the first of a series of patches you will receive from me today.

Please apply to 2.4.x and 2.5.x, thanks.

Author: Marcus Sundberg <[email protected]>

This patch fixes the multiport match, when it is used in combination with the invert (!) flag.

Signature · 4 lines
- Harald Welte / [email protected]               http://www.gnumonks.org/
============================================================================
"If this were a dictatorship, it'd be a heck of a lot easier, just so long
 as I'm the dictator."  --  George W. Bush Dec 18, 2000
net/ipv4/netfilter/ipt_multiport.c +1 -1
diff -ur linux.current/net/ipv4/netfilter/ipt_multiport.c linux-mine/net/ipv4/netfilter/ipt_multiport.c
@@ -78,7 +78,7 @@
 
 	/* Must specify proto == TCP/UDP, no unknown flags or bad count */
 	return (ip->proto == IPPROTO_TCP || ip->proto == IPPROTO_UDP)
-		&& !(ip->flags & IPT_INV_PROTO)
+		&& !(ip->invflags & IPT_INV_PROTO)
 		&& matchsize == IPT_ALIGN(sizeof(struct ipt_multiport))
 		&& (multiinfo->flags == IPT_MULTIPORT_SOURCE
 		    || multiinfo->flags == IPT_MULTIPORT_DESTINATION
#1 lore raw

From: Harald Welte <[email protected]>
Date: Thu, 9 Jan 2003 15:34:12 +0100

This is the first of a series of patches you will receive from me today.

Please apply to 2.4.x and 2.5.x, thanks.

Applied, thanks.