Commit fcbb8f6d authored by Willem de Bruijn's avatar Willem de Bruijn Committed by Juerg Haefliger

ieee802154: lowpan_header_create check must check daddr

BugLink: https://bugs.launchpad.net/bugs/1811647

[ Upstream commit 40c3ff6d ]

Packet sockets may call dev_header_parse with NULL daddr. Make
lowpan_header_ops.create fail.

Fixes: 87a93e4e ("ieee802154: change needed headroom/tailroom")
Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
Acked-by: default avatarAlexander Aring <aring@mojatatu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
parent 1866cb80
......@@ -55,6 +55,9 @@ int lowpan_header_create(struct sk_buff *skb, struct net_device *ldev,
const u8 *daddr = _daddr;
struct lowpan_addr_info *info;
if (!daddr)
return -EINVAL;
/* TODO:
* if this package isn't ipv6 one, where should it be routed?
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment