Skip to contentSkip to conversation

: don't reroute no mark change in mangle table without CONFIG_IP_ROUTE_FWMARK

PATCH In review Harald Welte 1 participant 1 message Jun 21, 2004 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 7/10 : don't reroute no mark change in mangle table without CONFIG_IP_ROUTE_FWMARK

This patch for 2.4 changes iptable_mangle so it won't reroute on nfmark change when routing by nfmark is not enabled.

Author: Patrick McHardy <[email protected]>

--
- Harald Welte <[email protected]> http://www.netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie

# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/06/20 22:39:04+02:00 [email protected]
# [NETFILTER]: Don't reroute on nfmark change in mangle table when routing by nfmark is not enabled
#

# net/ipv4/netfilter/iptable_mangle.c
#   2004/06/20 22:39:02+02:00 [email protected] +2 -0
#   [NETFILTER]: Don't reroute on nfmark change in mangle table when routing by nfmark is not enabled
# 
diff -Nru a/net/ipv4/netfilter/iptable_mangle.c b/net/ipv4/netfilter/iptable_mangle.c
--- a/net/ipv4/netfilter/iptable_mangle.c	2004-06-20 23:02:54 +02:00
+++ b/net/ipv4/netfilter/iptable_mangle.c	2004-06-20 23:02:54 +02:00
@@ -160,7 +160,9 @@
 	if (ret != NF_DROP && ret != NF_STOLEN && ret != NF_QUEUE
 	    && ((*pskb)->nh.iph->saddr != saddr
 		|| (*pskb)->nh.iph->daddr != daddr
+#ifdef CONFIG_IP_ROUTE_FWMARK
 		|| (*pskb)->nfmark != nfmark
+#endif
 		|| (*pskb)->nh.iph->tos != tos))
 		return ip_route_me_harder(pskb) == 0 ? ret : NF_DROP;