ieee802154: 6lowpan: Drop PACKET_OTHERHOST skbs in 6lowpan
authorSimon Vincent <simon.vincent@xsilon.com>
Sun, 5 Oct 2014 18:23:12 +0000 (20:23 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 25 Oct 2014 05:56:21 +0000 (07:56 +0200)
There is no point processing pkts which are PACKET_OTHERHOST
in 6lowpan as they are discarded as soon as they reach the
ipv6 layer. Therefore we should drop them in the 6lowpan layer.

Signed-off-by: Simon Vincent <simon.vincent@xsilon.com>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/ieee802154/6lowpan_rtnl.c

index 44136297b673a2b2645f481fb723222fa97b951a..56252ee157c9b5d532e7f711551675e5d33ffacd 100644 (file)
@@ -515,6 +515,9 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev,
        if (!netif_running(dev))
                goto drop_skb;
 
+       if (skb->pkt_type == PACKET_OTHERHOST)
+               goto drop_skb;
+
        if (dev->type != ARPHRD_IEEE802154)
                goto drop_skb;