Netdev List
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: guodeqing <geffrey.guo@huawei.com>, davem@davemloft.net
Cc: kuznet@ms2.inr.ac.ru, netdev@vger.kernel.org,
	dsa@cumulusnetworks.com, kuba@kernel.org
Subject: Re: [PATCH] net: Fix the arp error in some cases
Date: Tue, 16 Jun 2020 21:10:04 -0600	[thread overview]
Message-ID: <39780a81-8ac8-871b-2176-2102322f9321@gmail.com> (raw)
In-Reply-To: <1592359636-107798-1-git-send-email-geffrey.guo@huawei.com>

On 6/16/20 8:07 PM, guodeqing wrote:
> 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 is because fib_table_lookup in 
> fib_check_nh lookup the destnation 9.9.9.9 nexthop, the scope of 
> the fib result is RT_SCOPE_LINK,the correct scope is RT_SCOPE_HOST.  
> Here I add a check of whether this is RT_TABLE_MAIN to solve this problem.

fib_check_nh* is only used when the route is installed into the FIB to
verify the gateway is legit. It is not used when processing arp
requests. Why then, do you believe this fixes something?

  reply	other threads:[~2020-06-17  3:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-17  2:07 [PATCH] net: Fix the arp error in some cases guodeqing
2020-06-17  3:10 ` David Ahern [this message]
2020-06-17  3:38   ` 答复: " Guodeqing (A)
2020-06-17 12:44     ` David Ahern
  -- strict thread matches above, loose matches on Subject: below --
2020-06-16  1:00 guodeqing
2020-06-16  1:14 ` David Miller
2020-06-13  6:49 guodeqing
2020-06-13 14:31 ` David Ahern
2020-06-15 16:35 ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39780a81-8ac8-871b-2176-2102322f9321@gmail.com \
    --to=dsahern@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsa@cumulusnetworks.com \
    --cc=geffrey.guo@huawei.com \
    --cc=kuba@kernel.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox