mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
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>
This commit is contained in:
parent
81cf1ade0b
commit
fa0583c202
@ -458,8 +458,6 @@ looped_back:
|
||||
|
||||
ipv6_hdr(skb)->daddr = *addr;
|
||||
|
||||
skb_dst_drop(skb);
|
||||
|
||||
ip6_route_input(skb);
|
||||
|
||||
if (skb_dst(skb)->error) {
|
||||
@ -834,7 +832,6 @@ looped_back:
|
||||
*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));
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user