* [PATCH net] ipv6: Fix stats accounting in ip6_pkt_drop
@ 2022-04-04 15:09 David Ahern
2022-04-05 13:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: David Ahern @ 2022-04-04 15:09 UTC (permalink / raw)
To: netdev, kuba, davem, pabeni
Cc: Filip.Pudak, Jiguang.Xiao, ssuryaextr, David Ahern, Pudak, Xiao
VRF devices are the loopbacks for VRFs, and a loopback can not be
assigned to a VRF. Accordingly, the condition in ip6_pkt_drop should
be '||' not '&&'.
Fixes: 1d3fd8a10bed ("vrf: Use orig netdev to count Ip6InNoRoutes and a fresh route lookup when sending dest unreach")
Reported-by: Pudak, Filip <Filip.Pudak@windriver.com>
Reported-by: Xiao, Jiguang <Jiguang.Xiao@windriver.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
---
net/ipv6/route.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 2fa10e60cccd..169e9df6d172 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -4484,7 +4484,7 @@ static int ip6_pkt_drop(struct sk_buff *skb, u8 code, int ipstats_mib_noroutes)
struct inet6_dev *idev;
int type;
- if (netif_is_l3_master(skb->dev) &&
+ if (netif_is_l3_master(skb->dev) ||
dst->dev == net->loopback_dev)
idev = __in6_dev_get_safely(dev_get_by_index_rcu(net, IP6CB(skb)->iif));
else
--
2.24.3 (Apple Git-128)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] ipv6: Fix stats accounting in ip6_pkt_drop
2022-04-04 15:09 [PATCH net] ipv6: Fix stats accounting in ip6_pkt_drop David Ahern
@ 2022-04-05 13:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-04-05 13:20 UTC (permalink / raw)
To: David Ahern
Cc: netdev, kuba, davem, pabeni, Filip.Pudak, Jiguang.Xiao,
ssuryaextr, Pudak, Xiao
Hello:
This patch was applied to netdev/net.git (master)
by Paolo Abeni <pabeni@redhat.com>:
On Mon, 4 Apr 2022 09:09:08 -0600 you wrote:
> VRF devices are the loopbacks for VRFs, and a loopback can not be
> assigned to a VRF. Accordingly, the condition in ip6_pkt_drop should
> be '||' not '&&'.
>
> Fixes: 1d3fd8a10bed ("vrf: Use orig netdev to count Ip6InNoRoutes and a fresh route lookup when sending dest unreach")
> Reported-by: Pudak, Filip <Filip.Pudak@windriver.com>
> Reported-by: Xiao, Jiguang <Jiguang.Xiao@windriver.com>
> Signed-off-by: David Ahern <dsahern@kernel.org>
>
> [...]
Here is the summary with links:
- [net] ipv6: Fix stats accounting in ip6_pkt_drop
https://git.kernel.org/netdev/net/c/1158f79f82d4
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-05 20:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04 15:09 [PATCH net] ipv6: Fix stats accounting in ip6_pkt_drop David Ahern
2022-04-05 13:20 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.