summaryrefslogtreecommitdiffstats
path: root/net/mac802154
diff options
context:
space:
mode:
authorPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>2014-06-11 12:03:06 +0200
committerDavid S. Miller <davem@davemloft.net>2014-06-11 12:10:18 -0700
commita374eeb5e5b35c877a890dce5d3f7cca5a3e33f6 (patch)
tree943d4d192ac43515c511eeb51a0d30903e1ed435 /net/mac802154
parentd5c4858237fe43c30714f4447ccec87d5fb3fcde (diff)
downloadlinux-a374eeb5e5b35c877a890dce5d3f7cca5a3e33f6.tar.gz
linux-a374eeb5e5b35c877a890dce5d3f7cca5a3e33f6.tar.bz2
linux-a374eeb5e5b35c877a890dce5d3f7cca5a3e33f6.zip
mac802154: properly free incoming skbs on decryption failure
mac802154 RX did not free skbs on decryption failure, assuming that the caller would when the local rx handler returned _DROP. This was 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/wpan.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mac802154/wpan.c b/net/mac802154/wpan.c
index 23bc91cf99c4..c8cfd54f3711 100644
--- a/net/mac802154/wpan.c
+++ b/net/mac802154/wpan.c
@@ -472,6 +472,7 @@ mac802154_subif_frame(struct mac802154_sub_if_data *sdata, struct sk_buff *skb,
rc = mac802154_llsec_decrypt(&sdata->sec, skb);
if (rc) {
pr_debug("decryption failed: %i\n", rc);
+ kfree_skb(skb);
return NET_RX_DROP;
}