patch-2.1.25 linux/net/ipv4/ip_forward.c

Next file: linux/net/ipv4/ip_fw.c
Previous file: linux/net/ipv4/fib.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.24/linux/net/ipv4/ip_forward.c linux/net/ipv4/ip_forward.c
@@ -173,7 +173,6 @@
 			}
 			if (rt->rt_flags&RTCF_MASQ)
 				goto skip_call_fw_firewall;
-		}
 #endif
 #ifdef CONFIG_FIREWALL
 		fw_res=call_fw_firewall(PF_INET, dev2, iph, NULL);
@@ -191,6 +190,8 @@
 #endif
 
 #ifdef CONFIG_IP_MASQUERADE
+		}
+
 skip_call_fw_firewall:
 		/*
 		 * If this fragment needs masquerading, make it so...
@@ -219,7 +220,7 @@
 		}
 
 #ifdef CONFIG_FIREWALL
-		if ((fw_res = call_out_firewall(PF_INET, skb->dev, iph, NULL)) < FW_ACCEPT) {
+		if ((fw_res = call_out_firewall(PF_INET, dev2, iph, NULL)) < FW_ACCEPT) {
 			/* FW_ACCEPT and FW_MASQUERADE are treated equal:
 			   masquerading is only supported via forward rules */
 			if (fw_res == FW_REJECT)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov