ieee802154: lowpan_header_create check must check daddr
[ Upstream commit 40c3ff6d5e0809505a067dd423c110c5658c478c ]
Packet sockets may call dev_header_parse with NULL daddr. Make
lowpan_header_ops.create fail.
Fixes: 87a93e4ece
("ieee802154: change needed headroom/tailroom")
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Alexander Aring <aring@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ba2f5c1805
commit
615b74643b
1 changed files with 3 additions and 0 deletions
|
@ -55,6 +55,9 @@ int lowpan_header_create(struct sk_buff *skb, struct net_device *ldev,
|
||||||
const u8 *daddr = _daddr;
|
const u8 *daddr = _daddr;
|
||||||
struct lowpan_addr_info *info;
|
struct lowpan_addr_info *info;
|
||||||
|
|
||||||
|
if (!daddr)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
/* TODO:
|
/* TODO:
|
||||||
* if this package isn't ipv6 one, where should it be routed?
|
* if this package isn't ipv6 one, where should it be routed?
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue