Skip to contentSkip to conversation

af_ieee802154: fix check on broadcast address

PATCH Applied Alexander Aring 2 participants 4 messages Mar 20, 2014

Subsystems (3)
lore
Share & tools
lore

Alexander Aring

author maintainer
#0 lore raw

PATCH 1/2 af_ieee802154: fix check on broadcast address

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.

---
 net/ieee802154/af_ieee802154.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ieee802154/af_ieee802154.c +1 -1
index be44a86..351d9a9 100644
@@ -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();
Signature · 1 line
1.9.0
author maintainer
#1 lore raw

PATCH 2/2 ieee802154: dgram: cleanup set of broadcast panid

This patch is only a cleanup to use the right define for a panid field. The broadcast address and panid broadcast is still the same value.

Cc Phoebe Buckheister <[email protected]>
---
 net/ieee802154/dgram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ieee802154/dgram.c +1 -1
index 6d251a3..786437b 100644
@@ -74,7 +74,7 @@ static int dgram_init(struct sock *sk)
 	struct dgram_sock *ro = dgram_sk(sk);
 
 	ro->dst_addr.mode = IEEE802154_ADDR_LONG;
-	ro->dst_addr.pan_id = cpu_to_le16(IEEE802154_ADDR_BROADCAST);
+	ro->dst_addr.pan_id = cpu_to_le16(IEEE802154_PANID_BROADCAST);
 	ro->want_ack = 1;
 	memset(&ro->dst_addr.extended_addr, 0xff, IEEE802154_ADDR_LEN);
 	return 0;
Signature · 1 line
1.9.0
maintainer Applied
#2 lore raw
In reply to Alexander Aring

From: Alexander Aring <[email protected]>
Date: Thu, 20 Mar 2014 14:57:02 +0100

Quoted 2 lines

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

The canonical way to refer to commits is:

$SHA1_ID ("Commit message header line.")

I've fixed this up for you this time.

Quoted 5 lines

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

Applied, thanks.

author maintainer
#3 lore raw

Hi David,

Quoted 9 lines · David Miller

From: Alexander Aring <[email protected]>
Date: Thu, 20 Mar 2014 14:57:02 +0100

Quoted 2 lines

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

The canonical way to refer to commits is:

$SHA1_ID ("Commit message header line.")

ok, thanks. I will do it right next time. Sorry.

- Alex