path: root/net/mac802154/rx.c
diff options
authorAlexander Aring <alex.aring@gmail.com>2015-09-28 09:00:26 +0200
committerMarcel Holtmann <marcel@holtmann.org>2015-09-30 13:16:44 +0200
commitd58a2fa903c18f97aac30cd3c4c8a378a2c647c4 (patch)
tree2360d7c37869ea813208cd451a61b139fc02c323 /net/mac802154/rx.c
parenta26c5fd7622d4951425131d54a8c99f076fe2068 (diff)
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>
Diffstat (limited to 'net/mac802154/rx.c')
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c
index d1c33c1d6b9b..42e96729dae6 100644
--- a/net/mac802154/rx.c
+++ b/net/mac802154/rx.c
@@ -87,6 +87,10 @@ ieee802154_subif_frame(struct ieee802154_sub_if_data *sdata,
skb->dev = sdata->dev;
+ /* TODO this should be moved after netif_receive_skb call, otherwise
+ * wireshark will show a mac header with security fields and the
+ * payload is already decrypted.
+ */
rc = mac802154_llsec_decrypt(&sdata->sec, skb);
if (rc) {
pr_debug("decryption failed: %i\n", rc);