patch-2.0.30 linux/drivers/net/new_tunnel.c

Next file: linux/drivers/net/ni52.c
Previous file: linux/drivers/net/ne.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.29/linux/drivers/net/new_tunnel.c linux/drivers/net/new_tunnel.c
@@ -62,7 +62,6 @@
 */
 
 #include <linux/module.h>
-#include <linux/config.h>	/* for CONFIG_IP_FORWARD */
 
 /* Only two headers!! :-) */
 #include <net/ip.h>
@@ -303,9 +302,10 @@
 	 *	If ip_forward() made a copy, it will return 1 so we can free.
 	 */
 
-#ifdef CONFIG_IP_FORWARD
-	if (ip_forward(skb, dev, IPFWD_NOTTLDEC, target))
-#endif
+	if (sysctl_ip_forward) {
+		if (ip_forward(skb, dev, IPFWD_NOTTLDEC, target))
+			kfree_skb(skb, FREE_WRITE);
+	} else
 		kfree_skb(skb, FREE_WRITE);
 
 	/*

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