mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
ipv6: avoid write to a possibly cloned skb
am: 683100ed45
Change-Id: If32c172adceadc53f7222c310e8f939004154687
This commit is contained in:
@@ -757,13 +757,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)
|
||||
@@ -808,6 +809,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