From: Martin Townsend Date: Thu, 23 Oct 2014 14:40:54 +0000 (+0100) Subject: 6lowpan: fix process_data return values X-Git-Tag: firefly_0821_release~176^2~2717^2~28^2~129^2~63 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=04dfd7386ab7a0f016bbcf30b3a5051650242120;p=firefly-linux-kernel-4.4.55.git 6lowpan: fix process_data return values As process_data now returns just error codes fix up the calls to this function to only drop the skb if an error code is returned. Signed-off-by: Martin Townsend Acked-by: Alexander Aring Acked-by: Jukka Rissanen Signed-off-by: Marcel Holtmann --- diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c index 45d9a9fef634..94bbb6611bc5 100644 --- a/net/bluetooth/6lowpan.c +++ b/net/bluetooth/6lowpan.c @@ -347,7 +347,7 @@ static int recv_pkt(struct sk_buff *skb, struct net_device *dev, goto drop; ret = process_data(local_skb, dev, chan); - if (ret != NET_RX_SUCCESS) + if (ret < 0) goto drop; local_skb->protocol = htons(ETH_P_IPV6); diff --git a/net/ieee802154/6lowpan_rtnl.c b/net/ieee802154/6lowpan_rtnl.c index 15c7717c5e06..21742c827475 100644 --- a/net/ieee802154/6lowpan_rtnl.c +++ b/net/ieee802154/6lowpan_rtnl.c @@ -542,7 +542,7 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev, switch (skb->data[0] & 0xe0) { case LOWPAN_DISPATCH_IPHC: /* ipv6 datagram */ ret = process_data(skb, &hdr); - if (ret == NET_RX_DROP) + if (ret < 0) goto drop; return lowpan_give_skb_to_devices(skb, NULL); @@ -550,7 +550,7 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev, ret = lowpan_frag_rcv(skb, LOWPAN_DISPATCH_FRAG1); if (ret == 1) { ret = process_data(skb, &hdr); - if (ret == NET_RX_DROP) + if (ret < 0) goto drop; return lowpan_give_skb_to_devices(skb, NULL); @@ -563,7 +563,7 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev, ret = lowpan_frag_rcv(skb, LOWPAN_DISPATCH_FRAGN); if (ret == 1) { ret = process_data(skb, &hdr); - if (ret == NET_RX_DROP) + if (ret < 0) goto drop; return lowpan_give_skb_to_devices(skb, NULL);