Explorar o código

ipv4: use skb_dst_copy() in ip_copy_metadata()

Avoid touching dst refcount in ip_fragment().

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet %!s(int64=15) %!d(string=hai) anos
pai
achega
fe76cda308
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      net/ipv4/ip_output.c

+ 1 - 1
net/ipv4/ip_output.c

@@ -411,7 +411,7 @@ static void ip_copy_metadata(struct sk_buff *to, struct sk_buff *from)
 	to->priority = from->priority;
 	to->protocol = from->protocol;
 	skb_dst_drop(to);
-	skb_dst_set(to, dst_clone(skb_dst(from)));
+	skb_dst_copy(to, from);
 	to->dev = from->dev;
 	to->mark = from->mark;