patch-2.1.22 linux/net/ipv6/ipv6_input.c

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

diff -u --recursive --new-file v2.1.21/linux/net/ipv6/ipv6_input.c linux/net/ipv6/ipv6_input.c
@@ -269,6 +269,11 @@
 	__u8			*nhptr;
 	int			pkt_len;
 
+	if (skb->pkt_type == PACKET_OTHERHOST) {
+		kfree_skb(skb, FREE_READ);
+		return 0;
+	}
+
 	hdr = skb->nh.ipv6h;
 	skb->h.raw = (__u8*)hdr;
 
@@ -408,6 +413,11 @@
 	}
 	else
 	{
+		if (skb->pkt_type != PACKET_HOST) {
+			kfree_skb(skb, FREE_READ);
+			return 0;
+		}
+
 		if (ipv6_forwarding)
 		{
 			if (addr_type & IPV6_ADDR_LINKLOCAL)

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