Commit fe76cda3 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

ipv4: use skb_dst_copy() in ip_copy_metadata()

Avoid touching dst refcount in ip_fragment().
Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a99db196
...@@ -411,7 +411,7 @@ static void ip_copy_metadata(struct sk_buff *to, struct sk_buff *from) ...@@ -411,7 +411,7 @@ static void ip_copy_metadata(struct sk_buff *to, struct sk_buff *from)
to->priority = from->priority; to->priority = from->priority;
to->protocol = from->protocol; to->protocol = from->protocol;
skb_dst_drop(to); skb_dst_drop(to);
skb_dst_set(to, dst_clone(skb_dst(from))); skb_dst_copy(to, from);
to->dev = from->dev; to->dev = from->dev;
to->mark = from->mark; to->mark = from->mark;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment