For IEEE802154_ADDR_NONE it now checks that the frame type for acknowledgement.
For the reserved dest mode it frees the skb and returns.

Signed-off-by: Martin Townsend <martin.towns...@xsilon.com>
---
 net/mac802154/wpan.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/mac802154/wpan.c b/net/mac802154/wpan.c
index 3c3069f..70d5307 100644
--- a/net/mac802154/wpan.c
+++ b/net/mac802154/wpan.c
@@ -433,7 +433,7 @@ mac802154_subif_frame(struct mac802154_sub_if_data *sdata, 
struct sk_buff *skb,
 
        switch (mac_cb(skb)->dest.mode) {
        case IEEE802154_ADDR_NONE:
-               if (mac_cb(skb)->dest.mode != IEEE802154_ADDR_NONE)
+               if (mac_cb(skb)->type != IEEE802154_FC_TYPE_ACK)
                        /* FIXME: check if we are PAN coordinator */
                        skb->pkt_type = PACKET_OTHERHOST;
                else
@@ -462,7 +462,9 @@ mac802154_subif_frame(struct mac802154_sub_if_data *sdata, 
struct sk_buff *skb,
                        skb->pkt_type = PACKET_OTHERHOST;
                break;
        default:
-               break;
+               spin_unlock_bh(&sdata->mib_lock);
+               kfree_skb(skb);
+               return NET_RX_DROP;
        }
 
        spin_unlock_bh(&sdata->mib_lock);
-- 
1.9.1



------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to