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

Commit b678aa57 authored by Jason A. Donenfeld's avatar Jason A. Donenfeld Committed by David S. Miller
Browse files

ipv6: do not increment mac header when it's unset



Otherwise we'll overflow the integer. This occurs when layer 3 tunneled
packets are handed off to the IPv6 layer.

Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a6e2846c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -456,6 +456,7 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev,
	skb_network_header(head)[nhoff] = skb_transport_header(head)[0];
	memmove(head->head + sizeof(struct frag_hdr), head->head,
		(head->data - head->head) - sizeof(struct frag_hdr));
	if (skb_mac_header_was_set(head))
		head->mac_header += sizeof(struct frag_hdr);
	head->network_header += sizeof(struct frag_hdr);