Skip to content

Commit

Permalink
mac802154: llsec: correctly lookup implicit-indexed keys
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Phoebe Buckheister authored and David S. Miller committed May 22, 2014
1 parent beb5842 commit 53819a6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/mac802154/llsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ static bool llsec_key_id_equal(const struct ieee802154_llsec_key_id *a,
return false;

switch (a->mode) {
case IEEE802154_SCF_KEY_INDEX:
return true;
case IEEE802154_SCF_KEY_SHORT_INDEX:
return a->short_source == b->short_source;
case IEEE802154_SCF_KEY_HW_INDEX:
Expand Down

0 comments on commit 53819a6

Please sign in to comment.