Skip to content

Commit 1158f79

Browse files
dsahernPaolo Abeni
authored andcommitted
ipv6: Fix stats accounting in ip6_pkt_drop
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: 1d3fd8a ("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> Link: https://lore.kernel.org/r/20220404150908.2937-1-dsahern@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 61fb3ee commit 1158f79

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/ipv6/route.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4484,7 +4484,7 @@ static int ip6_pkt_drop(struct sk_buff *skb, u8 code, int ipstats_mib_noroutes)
44844484
struct inet6_dev *idev;
44854485
int type;
44864486

4487-
if (netif_is_l3_master(skb->dev) &&
4487+
if (netif_is_l3_master(skb->dev) ||
44884488
dst->dev == net->loopback_dev)
44894489
idev = __in6_dev_get_safely(dev_get_by_index_rcu(net, IP6CB(skb)->iif));
44904490
else

0 commit comments

Comments
 (0)