patch-2.1.68 linux/net/ipv6/ip6_output.c

Next file: linux/net/ipv6/ipv6_sockglue.c
Previous file: linux/net/ipv6/ip6_input.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.67/linux/net/ipv6/ip6_output.c linux/net/ipv6/ip6_output.c
@@ -5,7 +5,7 @@
  *	Authors:
  *	Pedro Roque		<roque@di.fc.ul.pt>	
  *
- *	$Id: ip6_output.c,v 1.3 1997/03/18 18:24:37 davem Exp $
+ *	$Id: ip6_output.c,v 1.5 1997/09/21 18:33:14 kuznet Exp $
  *
  *	Based on linux/net/ipv4/ip_output.c
  *
@@ -540,6 +540,11 @@
 	struct ipv6hdr *hdr = skb->nh.ipv6h;
 	int size;
 	
+	if (ipv6_config.forwarding == 0) {
+		kfree_skb(skb, FREE_READ);
+		return -EINVAL;
+	}
+
 	/*
 	 *	check hop-by-hop options present
 	 */

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