mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
ipv6: avoid write to a possibly cloned skb
am: aed728c38c
Change-Id: I7bbff2dcff94ea2804d3f21cd0341379332a47e6
This commit is contained in:
@@ -742,13 +742,14 @@ slow_path:
|
||||
* Fragment the datagram.
|
||||
*/
|
||||
|
||||
*prevhdr = NEXTHDR_FRAGMENT;
|
||||
troom = rt->dst.dev->needed_tailroom;
|
||||
|
||||
/*
|
||||
* Keep copying data until we run out.
|
||||
*/
|
||||
while (left > 0) {
|
||||
u8 *fragnexthdr_offset;
|
||||
|
||||
len = left;
|
||||
/* IF: it doesn't fit, use 'mtu' - the data space left */
|
||||
if (len > mtu)
|
||||
@@ -793,6 +794,10 @@ slow_path:
|
||||
*/
|
||||
skb_copy_from_linear_data(skb, skb_network_header(frag), hlen);
|
||||
|
||||
fragnexthdr_offset = skb_network_header(frag);
|
||||
fragnexthdr_offset += prevhdr - skb_network_header(skb);
|
||||
*fragnexthdr_offset = NEXTHDR_FRAGMENT;
|
||||
|
||||
/*
|
||||
* Build fragment header.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user