diff options
author | Yuya Tajima <yuya.tajimaa@gmail.com> | 2023-05-15 18:34:27 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-05-17 11:05:47 +0300 |
commit | fa0583c202433c3d359a1b0579f52da16e25e4df (patch) | |
tree | 5cefd694152d86f670848865b92e2289f5fe474b /net/ipv6/seg6_iptunnel.c | |
parent | 81cf1ade0bb3a42023dd1694ed080c4adb7dafd3 (diff) | |
download | linux-fa0583c202433c3d359a1b0579f52da16e25e4df.tar.xz |
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.
Signed-off-by: Yuya Tajima <yuya.tajimaa@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/seg6_iptunnel.c')
-rw-r--r-- | net/ipv6/seg6_iptunnel.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/seg6_iptunnel.c b/net/ipv6/seg6_iptunnel.c index 34db881204d2..03b877ff4558 100644 --- a/net/ipv6/seg6_iptunnel.c +++ b/net/ipv6/seg6_iptunnel.c @@ -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); } |