[1/3]

>From f8db8cf57096c66c08aea99981c8cbf7e0af1caa Mon Sep 17 00:00:00 2001
From: Alexander Smirnov <alex.bluesman.smir...@gmail.com>
Date: Sun, 26 Jun 2011 16:35:28 +0400
Subject: [PATCH 1/3] Check if address is broadcast before
comparison with host address. Otherwise if we set our address
to 0xffff, broadcast packages will be incorrectly indentified
as host ones.

Based on Jon Smirl code.

Signed-off-by: Alexander Smirnov <alex.bluesman.smir...@gmail.com>
---
 net/mac802154/wpan.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/mac802154/wpan.c b/net/mac802154/wpan.c
index 33fcbd9..6ba52c7 100644
--- a/net/mac802154/wpan.c
+++ b/net/mac802154/wpan.c
@@ -413,11 +413,11 @@ static int mac802154_subif_frame(struct 
mac802154_sub_if_data *sdata,
                if (mac_cb(skb)->da.pan_id != sdata->pan_id &&
                    mac_cb(skb)->da.pan_id != IEEE802154_PANID_BROADCAST)
                        skb->pkt_type = PACKET_OTHERHOST;
-               else if (mac_cb(skb)->da.short_addr == sdata->short_addr)
-                       skb->pkt_type = PACKET_HOST;
                else if (mac_cb(skb)->da.short_addr ==
                                        IEEE802154_ADDR_BROADCAST)
                        skb->pkt_type = PACKET_BROADCAST;
+               else if (mac_cb(skb)->da.short_addr == sdata->short_addr)
+                       skb->pkt_type = PACKET_HOST;
                else
                        skb->pkt_type = PACKET_OTHERHOST;
                break;
-- 
1.7.2.3

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to