Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40c3ff6d authored by Willem de Bruijn's avatar Willem de Bruijn Committed by David S. Miller
Browse files

ieee802154: lowpan_header_create check must check daddr



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>
parent 7bdca378
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -48,6 +48,9 @@ int lowpan_header_create(struct sk_buff *skb, struct net_device *ldev,
	const struct ipv6hdr *hdr = ipv6_hdr(skb);
	struct neighbour *n;

	if (!daddr)
		return -EINVAL;

	/* TODO:
	 * if this package isn't ipv6 one, where should it be routed?
	 */