Message ID | 1592269250-36987-1-git-send-email-geffrey.guo@huawei.com |
---|---|
State | Not Applicable |
Delegated to: | David Miller |
Headers | show |
Series | net: Fix the arp error in some cases | expand |
From: guodeqing <geffrey.guo@huawei.com> Date: Tue, 16 Jun 2020 09:00:50 +0800 > ie., > $ ifconfig eth0 6.6.6.6 netmask 255.255.255.0 > > $ ip rule add from 6.6.6.6 table 6666 > > $ ip route add 9.9.9.9 via 6.6.6.6 > > $ ping -I 6.6.6.6 9.9.9.9 > PING 9.9.9.9 (9.9.9.9) from 6.6.6.6 : 56(84) bytes of data. > > 3 packets transmitted, 0 received, 100% packet loss, time 2079ms > > $ arp > Address HWtype HWaddress Flags Mask Iface > 6.6.6.6 (incomplete) eth0 > > The arp request address is error, this problem can be reproduced easily. > > Fixes: 3bfd847203c6("net: Use passed in table for nexthop lookups") > Signed-off-by: guodeqing <geffrey.guo@huawei.com> When David Ahern said you need to more clearly explain the actual problem you are seeing, he also meant that you need to add that information to your commit message as well.
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index e53871e..1f75dc6 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c @@ -1109,7 +1109,7 @@ static int fib_check_nh_v4_gw(struct net *net, struct fib_nh *nh, u32 table, if (fl4.flowi4_scope < RT_SCOPE_LINK) fl4.flowi4_scope = RT_SCOPE_LINK; - if (table) + if (table && table != RT_TABLE_MAIN) tbl = fib_get_table(net, table); if (tbl)
ie., $ ifconfig eth0 6.6.6.6 netmask 255.255.255.0 $ ip rule add from 6.6.6.6 table 6666 $ ip route add 9.9.9.9 via 6.6.6.6 $ ping -I 6.6.6.6 9.9.9.9 PING 9.9.9.9 (9.9.9.9) from 6.6.6.6 : 56(84) bytes of data. 3 packets transmitted, 0 received, 100% packet loss, time 2079ms $ arp Address HWtype HWaddress Flags Mask Iface 6.6.6.6 (incomplete) eth0 The arp request address is error, this problem can be reproduced easily. Fixes: 3bfd847203c6("net: Use passed in table for nexthop lookups") Signed-off-by: guodeqing <geffrey.guo@huawei.com> --- net/ipv4/fib_semantics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)