From: Thomas Graf <tgraf@suug.ch>
To: Boris Sukholitko <bobatonhu@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [RFC, PATCH] Purging local routes on NETDEV_DOWN event
Date: Sun, 5 Nov 2006 16:56:54 +0100 [thread overview]
Message-ID: <20061105155654.GL12964@postel.suug.ch> (raw)
In-Reply-To: <589170c50611050600r3d4bfaafvb2acd513ae695a96@mail.gmail.com>
* Boris Sukholitko <bobatonhu@gmail.com> 2006-11-05 16:00
> We've noticed that when taking network interface down the local route
> for its address is preserved. The following console session
> illustrates it:
>
> # ip addr add 5.5.5.5 dev eth4
> # ip route list table all | grep eth4
> local 5.5.5.5 dev eth4 table 255 vrf 0 proto kernel scope host src
> 5.5.5.5
> # ip link set eth4 down
> local 5.5.5.5 dev eth4 table 255 vrf 0 proto kernel scope host src
> 5.5.5.5
This example is incomplete and misleading. The local route is managed
completely synchroneous with the address itself. See the NETDEV_UP/
NETDEV_DOWN handlers of inetaddr events:
case NETDEV_UP:
fib_add_ifaddr(ifa);
case NETDEV_DOWN:
fib_del_ifaddr(ifa);
The broadcast routes are added/removed when the interface goes up
and down. The fib_addr_ifaddr() in the NETDEV_UP() handler only
exists to add broadcast routes for local address which have been added
while the interface was down.
next prev parent reply other threads:[~2006-11-05 15:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-05 14:00 [RFC, PATCH] Purging local routes on NETDEV_DOWN event Boris Sukholitko
2006-11-05 15:56 ` Thomas Graf [this message]
2006-11-05 21:16 ` David Miller
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=20061105155654.GL12964@postel.suug.ch \
--to=tgraf@suug.ch \
--cc=bobatonhu@gmail.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).