Commit 06324f2f authored by Alexander Aring's avatar Alexander Aring Committed by David S. Miller

af_ieee802154: fix check on broadcast address

This patch fixes an issue which was introduced by commit
b70ab2e8 ("ieee802154: enforce
consistent endianness in the 802.15.4 stack").

The correct behaviour should be a check on the broadcast address field
which is 0xffff.
Signed-off-by: default avatarAlexander Aring <alex.aring@gmail.com>
Reported-by: default avatarJan Luebbe <jlu@pengutronix.de>
Cc: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3c6f5592
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment