Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1505578
| From | "Jason A. Donenfeld" <Jason@zx2c4.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] ipv6: do not increment mac header when it's unset |
| Date | 2016-10-21 10:50 +0200 |
| Message-ID | <suDGy-37e-25@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Otherwise we'll overflow the integer. This occurs when layer 3 tunneled packets are handed off to the IPv6 layer. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> --- net/ipv6/reassembly.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index e2ea311..431d69d 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c @@ -456,7 +456,8 @@ 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)); - head->mac_header += sizeof(struct frag_hdr); + if (skb_mac_header_was_set(skb)) + head->mac_header += sizeof(struct frag_hdr); head->network_header += sizeof(struct frag_hdr); skb_reset_transport_header(head); -- 2.10.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] ipv6: do not increment mac header when it's unset "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-10-21 10:50 +0200
[PATCH] ipv6: do not increment mac header when it's unset "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-10-21 11:10 +0200
Re: [PATCH] ipv6: do not increment mac header when it's unset "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-10-21 11:30 +0200
csiph-web