diff options
author | Alexander Aring <aring@mojatatu.com> | 2018-04-20 14:54:13 -0400 |
---|---|---|
committer | Stefan Schmidt <stefan@osg.samsung.com> | 2018-04-23 20:56:24 +0200 |
commit | f18fa5de5ba7f1d6650951502bb96a6e4715a948 (patch) | |
tree | 81aac5b693d835de166b7dfa6b46d13b372313d9 /net/ieee802154/6lowpan/6lowpan_i.h | |
parent | 7e0ffee1b2e7d26cc2147be0d9d5186823e923f3 (diff) |
net: ieee802154: 6lowpan: fix frag reassembly
This patch initialize stack variables which are used in
frag_lowpan_compare_key to zero. In my case there are padding bytes in the
structures ieee802154_addr as well in frag_lowpan_compare_key. Otherwise
the key variable contains random bytes. The result is that a compare of
two keys by memcmp works incorrect.
Fixes: 648700f76b03 ("inet: frags: use rhashtables for reassembly units")
Signed-off-by: Alexander Aring <aring@mojatatu.com>
Reported-by: Stefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: Stefan Schmidt <stefan@osg.samsung.com>
Diffstat (limited to 'net/ieee802154/6lowpan/6lowpan_i.h')
-rw-r--r-- | net/ieee802154/6lowpan/6lowpan_i.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ieee802154/6lowpan/6lowpan_i.h b/net/ieee802154/6lowpan/6lowpan_i.h index b8d95cb71c25..44a7e16bf3b5 100644 --- a/net/ieee802154/6lowpan/6lowpan_i.h +++ b/net/ieee802154/6lowpan/6lowpan_i.h @@ -20,8 +20,8 @@ typedef unsigned __bitwise lowpan_rx_result; struct frag_lowpan_compare_key { u16 tag; u16 d_size; - const struct ieee802154_addr src; - const struct ieee802154_addr dst; + struct ieee802154_addr src; + struct ieee802154_addr dst; }; /* Equivalent of ipv4 struct ipq |