diff options
author | Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> | 2014-05-20 11:51:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-22 15:27:32 -0400 |
commit | 53819a6ced288a9abd3c0d36895bd0d006edf093 (patch) | |
tree | a1b229aff0a3a7ad4e901dd635140b6512bc835a /net/mac802154 | |
parent | beb584275bdb5633cbb4c6d1bfb424958ecebfea (diff) |
mac802154: llsec: correctly lookup implicit-indexed keys
Key id comparison for type 1 keys (implicit source, with index) should
return true if mode and id are equal, not false.
Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac802154')
-rw-r--r-- | net/mac802154/llsec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c index 08d08cbf51f4..e4a25589ec19 100644 --- a/net/mac802154/llsec.c +++ b/net/mac802154/llsec.c | |||
@@ -207,6 +207,8 @@ static bool llsec_key_id_equal(const struct ieee802154_llsec_key_id *a, | |||
207 | return false; | 207 | return false; |
208 | 208 | ||
209 | switch (a->mode) { | 209 | switch (a->mode) { |
210 | case IEEE802154_SCF_KEY_INDEX: | ||
211 | return true; | ||
210 | case IEEE802154_SCF_KEY_SHORT_INDEX: | 212 | case IEEE802154_SCF_KEY_SHORT_INDEX: |
211 | return a->short_source == b->short_source; | 213 | return a->short_source == b->short_source; |
212 | case IEEE802154_SCF_KEY_HW_INDEX: | 214 | case IEEE802154_SCF_KEY_HW_INDEX: |