mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-01 10:42:11 +00:00
ipv6: rpl: Remove redundant skb_dst_drop().
RPL code has a pattern where skb_dst_drop() is called before ip6_route_input(). However, ip6_route_input() calls skb_dst_drop() internally, so we need not call skb_dst_drop() before ip6_route_input(). Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://lore.kernel.org/r/20230710213511.5364-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
fa3530be69
commit
c5ec13e38a
@ -612,8 +612,6 @@ static int ipv6_rpl_srh_rcv(struct sk_buff *skb)
|
||||
|
||||
kfree(buf);
|
||||
|
||||
skb_dst_drop(skb);
|
||||
|
||||
ip6_route_input(skb);
|
||||
|
||||
if (skb_dst(skb)->error) {
|
||||
|
@ -272,8 +272,6 @@ static int rpl_input(struct sk_buff *skb)
|
||||
dst = dst_cache_get(&rlwt->cache);
|
||||
preempt_enable();
|
||||
|
||||
skb_dst_drop(skb);
|
||||
|
||||
if (!dst) {
|
||||
ip6_route_input(skb);
|
||||
dst = skb_dst(skb);
|
||||
@ -284,6 +282,7 @@ static int rpl_input(struct sk_buff *skb)
|
||||
preempt_enable();
|
||||
}
|
||||
} else {
|
||||
skb_dst_drop(skb);
|
||||
skb_dst_set(skb, dst);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user