Skip to contentSkip to conversation

Remove the redundant skb->dev initialization in ip6_fragment

PATCH Applied Chenbo Feng 2 participants 2 messages Jun 10, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove the redundant skb->dev initialization in ip6_fragment

From: Chenbo Feng <[email protected]>

After moves the skb->dev and skb->protocol initialization into ip6_output, setting the skb->dev inside ip6_fragment is unnecessary.

Fixes 97a7a37a7b7b("ipv6: Initial skb->dev and skb->protocol in ip6_output")
---
 net/ipv6/ip6_output.c | 1 -
 1 file changed, 1 deletion(-)
net/ipv6/ip6_output.c +0 -1
index 02cd44f..0d6f3b6 100644
@@ -869,7 +869,6 @@ int ip6_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
 	if (skb->sk && dst_allfrag(skb_dst(skb)))
 		sk_nocaps_add(skb->sk, NETIF_F_GSO_MASK);
 
-	skb->dev = skb_dst(skb)->dev;
 	icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
 	err = -EMSGSIZE;
 
Signature · 1 line
2.7.4
maintainer Applied
#1 lore raw

From: Chenbo Feng <[email protected]>
Date: Sat, 10 Jun 2017 12:35:38 -0700

Quoted 7 lines

From: Chenbo Feng <[email protected]>

After moves the skb->dev and skb->protocol initialization into ip6_output, setting the skb->dev inside ip6_fragment is unnecessary.

Fixes 97a7a37a7b7b("ipv6: Initial skb->dev and skb->protocol in ip6_output")

Applied, thank you.