From: Simon Vincent Date: Sun, 5 Oct 2014 18:23:12 +0000 (+0200) Subject: ieee802154: 6lowpan: Drop PACKET_OTHERHOST skbs in 6lowpan X-Git-Tag: v5.15~16721^2~28^2~129^2~133 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39f6eb19cf85b08b8a926294750f5e79c50a6a7b;p=platform%2Fkernel%2Flinux-starfive.git ieee802154: 6lowpan: Drop PACKET_OTHERHOST skbs in 6lowpan 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 Signed-off-by: Alexander Aring Signed-off-by: Marcel Holtmann --- diff --git a/net/ieee802154/6lowpan_rtnl.c b/net/ieee802154/6lowpan_rtnl.c index 4413629..56252ee 100644 --- a/net/ieee802154/6lowpan_rtnl.c +++ b/net/ieee802154/6lowpan_rtnl.c @@ -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;