From: David Ahern <dsahern@gmail.com>
To: Alexander Aring <aring@mojatatu.com>, netdev@vger.kernel.org
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Subject: Re: routing UAPI mismatch invalid state behavior?
Date: Sun, 15 Oct 2017 19:56:34 -0600 [thread overview]
Message-ID: <8510da96-d8dc-8248-166a-d3ce22051a98@gmail.com> (raw)
In-Reply-To: <CAOHTApje2ABpRPghhqabD=JkBOzjFjVmc1N67ReDBLHeGGVe1Q@mail.gmail.com>
On 10/15/17 11:02 AM, Alexander Aring wrote:
> Hi,
>
> I figure out some problem, easy to reproduce:
>
> # setup dummy
> $ modprobe dummy
> $ ip link set dummy0 up
>
> # issue
> $ ip route replace default via 169.254.65.37 dev dummy0
> RTNETLINK answers: Network is unreachable
This fails in fib_check_nh. Basically the lookup of the address fails
making it an invalid gateway.
>
> so it will forbid me to do that, but:
>
> $ ip route replace 169.254.65.37 dev dummy0
This succeeds because iproute2 adds NLM_F_CREATE to flags along with
REPLACE:
if (matches(*argv, "replace") == 0)
return iproute_modify(RTM_NEWROUTE,
NLM_F_CREATE|NLM_F_REPLACE,
argc-1, argv+1);
but your overall intent here of resolving 169.254.65.37 is the key.
> $ ip route replace default via 169.254.65.37 dev dummy0
The existence of the previous route allows the gateway check in
fib_check_nh to succeed.
> $ ip route del 169.254.65.37 dev dummy0
>
> allows me to do that. Is there now a invalid state in my routing table
> or is it an expected behavior?
There are no recursive checks to gateway lookups once the routes are
installed. With the way routes and nexthops are currently created doing
so would be very expensive in some setups.
prev parent reply other threads:[~2017-10-16 1:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-15 17:02 routing UAPI mismatch invalid state behavior? Alexander Aring
2017-10-16 1:56 ` David Ahern [this message]
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=8510da96-d8dc-8248-166a-d3ce22051a98@gmail.com \
--to=dsahern@gmail.com \
--cc=aring@mojatatu.com \
--cc=jhs@mojatatu.com \
--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;
as well as URLs for NNTP newsgroup(s).