Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alexander Aring and committed by
Marcel Holtmann
d58a2fa9 a26c5fd7

+8
+4
net/mac802154/rx.c
··· 87 87 88 88 skb->dev = sdata->dev; 89 89 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 + */ 90 94 rc = mac802154_llsec_decrypt(&sdata->sec, skb); 91 95 if (rc) { 92 96 pr_debug("decryption failed: %i\n", rc);
+4
net/mac802154/tx.c
··· 129 129 struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev); 130 130 int rc; 131 131 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 + */ 132 136 rc = mac802154_llsec_encrypt(&sdata->sec, skb); 133 137 if (rc) { 134 138 netdev_warn(dev, "encryption failed: %i\n", rc);