seg6: Cleanup duplicates of skb_dst_drop calls
Subsystems (4)
PATCH 1/1 seg6: Cleanup duplicates of skb_dst_drop calls
In processing IPv6 segment routing header (SRH), several functions call skb_dst_drop before ip6_route_input. However, ip6_route_input calls skb_dst_drop within it, so there is no need to call skb_dst_drop in advance.
--- net/ipv6/exthdrs.c | 3 --- net/ipv6/seg6_iptunnel.c | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-)
net/ipv6/exthdrs.c +0 -3
@@ -458,8 +458,6 @@ static int ipv6_srh_rcv(struct sk_buff *skb)ipv6_hdr (skb)->daddr = *addr; -skb_dst_drop (skb); -ip6_route_input (skb);if (skb_dst (skb)->error) {
@@ -834,7 +832,6 @@ static int ipv6_rthdr_rcv(struct sk_buff *skb) *addr =ipv6_hdr (skb)->daddr;ipv6_hdr (skb)->daddr = daddr; -skb_dst_drop (skb);ip6_route_input (skb);if (skb_dst (skb)->error) {skb_push (skb, skb->data -skb_network_header (skb));
net/ipv6/seg6_iptunnel.c +1 -2
@@ -470,8 +470,6 @@ static int seg6_input_core(struct net *net, struct sock *sk, dst =dst_cache_get (&slwt->cache);preempt_enable (); -skb_dst_drop (skb); -if (!dst) {ip6_route_input (skb); dst =skb_dst (skb);
@@ -482,6 +480,7 @@ static int seg6_input_core(struct net *net, struct sock *sk,preempt_enable (); } }else { +skb_dst_drop (skb);skb_dst_set (skb, dst); }
Signature · 1 line
2.34.1
Quoted 5 lines · Yuya Tajima
In processing IPv6 segment routing header (SRH), several functions call
skb_dst_dropbeforeip6_route_input. However,ip6_route_inputcallsskb_dst_dropwithin it, so there is no need to callskb_dst_dropin advance.Signed-off-by Yuya Tajima <[email protected]>
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Quoted 9 lines · On Mon, 15 May 2023 15:34:27 +0000 you wrote:
In processing IPv6 segment routing header (SRH), several functions call
skb_dst_dropbeforeip6_route_input. However,ip6_route_inputcallsskb_dst_dropwithin it, so there is no need to callskb_dst_dropin advance.Signed-off-by Yuya Tajima <[email protected]>--- net/ipv6/exthdrs.c | 3 --- net/ipv6/seg6_iptunnel.c | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-)
Here is the summary with links:
- [net-next] seg6: Cleanup duplicates of skb_dst_drop calls
https://git.kernel.org/netdev/net-next/c/fa0583c20243
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html