This patch fixes an issue which was introduced by commit
(b70ab2e87f17176d18f67ef331064441a032b5f3).

The correct behaviour should be a check on the broadcast address field
which is 0xffff.

Signed-off-by: Alexander Aring <alex.ar...@gmail.com>
Reported-by: Jan Luebbe <j...@pengutronix.de>
Cc: Phoebe Buckheister <phoebe.buckheis...@itwm.fraunhofer.de>
---
 net/ieee802154/af_ieee802154.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ieee802154/af_ieee802154.c b/net/ieee802154/af_ieee802154.c
index be44a86..351d9a9 100644
--- a/net/ieee802154/af_ieee802154.c
+++ b/net/ieee802154/af_ieee802154.c
@@ -63,7 +63,7 @@ ieee802154_get_dev(struct net *net, const struct 
ieee802154_addr *addr)
        case IEEE802154_ADDR_SHORT:
                if (addr->pan_id == cpu_to_le16(IEEE802154_PANID_BROADCAST) ||
                    addr->short_addr == cpu_to_le16(IEEE802154_ADDR_UNDEF) ||
-                   addr->short_addr == cpu_to_le16(IEEE802154_ADDR_UNDEF))
+                   addr->short_addr == cpu_to_le16(IEEE802154_ADDR_BROADCAST))
                        break;
 
                rtnl_lock();
-- 
1.9.0


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to