Skip to contentSkip to conversation

Iptables multiport match fix

PATCH New Marcus Sundberg 1 participant 1 message Jul 9, 2002

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

PATCH 1/1 Iptables multiport match fix

Hi,

The multiport match checks for the IPT_INV_PROTO flag in the 'flags' member of struct ipt_ip instead of in the 'invflags' member.

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

(Where should I send this btw? The kernel part of iptables doesn't seem to be in the netfilter CVS. Was I supposed to create a p-o-m patch? Or send it directly to Marcelo?)

//Marcus

Signature · 3 lines
---------------------------------------+--------------------------
  Marcus Sundberg <[email protected]>  | Firewalls with SIP & NAT
 Firewall Developer, Ingate Systems AB |  http://www.ingate.com/