Skip to content

Commit d58a2fa

Browse files
alexaringholtmann
authored andcommitted
mac802154: add comments for llsec issues
While doing a little test with the llsec implementation I saw these issues. We should move decryption and encruption somewhere else, otherwise while capturing with wireshark the mac header shows secuirty fields but the payload is plaintext. A complete other issue is what doing with HardMAC drivers where the payload is always plaintext. I think we need a special handling then in userspace. We currently doesn't support any HardMAC transceivers, so we should fix the first issue for SoftMAC transceivers. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
1 parent a26c5fd commit d58a2fa

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎net/mac802154/rx.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ ieee802154_subif_frame(struct ieee802154_sub_if_data *sdata,
8787

8888
skb->dev = sdata->dev;
8989

90+
/* TODO this should be moved after netif_receive_skb call, otherwise
91+
* wireshark will show a mac header with security fields and the
92+
* payload is already decrypted.
93+
*/
9094
rc = mac802154_llsec_decrypt(&sdata->sec, skb);
9195
if (rc) {
9296
pr_debug("decryption failed: %i\n", rc);

‎net/mac802154/tx.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ ieee802154_subif_start_xmit(struct sk_buff *skb, struct net_device *dev)
129129
struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev);
130130
int rc;
131131

132+
/* TODO we should move it to wpan_dev_hard_header and dev_hard_header
133+
* functions. The reason is wireshark will show a mac header which is
134+
* with security fields but the payload is not encrypted.
135+
*/
132136
rc = mac802154_llsec_encrypt(&sdata->sec, skb);
133137
if (rc) {
134138
netdev_warn(dev, "encryption failed: %i\n", rc);

0 commit comments

Comments
 (0)