From: Phil Blundell <philb@gnu.org>
To: Steffen Sledz <sledz@dresearch-fe.de>
Cc: Tim, Riker <Tim@Rikers.org>,
openembedded-devel <openembedded-devel@lists.openembedded.org>
Subject: Re: default route handling of udhcpc
Date: Mon, 07 Nov 2011 10:57:33 +0000 [thread overview]
Message-ID: <1320663454.22985.643.camel@phil-desktop> (raw)
In-Reply-To: <4EB7B383.10106@dresearch-fe.de>
On Mon, 2011-11-07 at 11:31 +0100, Steffen Sledz wrote:
> What do you mean with stale routes? If an interfaces supports a
> default route it is availailable as long as the interface is up. If
> the interface goes down all routes using this interface are removed.
I was thinking about the case of an interface changing address without
actually going down. For example, try this:
# ip addr add 192.168.11.2/24 dev dummy0
# ip route append default via 192.168.11.1
# ip addr add 192.168.12.2/24 dev dummy0
# ip addr del 192.168.11.2/24 dev dummy0
# ip route append default via 192.168.12.1
which, I think, will leave you with a "stale" default route pointing to
192.168.11.1 even though you no longer have any addresses on that
subnet.
If it's the case that interfaces always do go down and then up again
when changing configuration then you're right, it would be a non-issue.
I guess maybe the best thing to do is to make sure that this is true and
then we could avoid the unconditional route squashing as you suggest.
> On the contrary. As i mentioned above we really hit a problem with current setting.
>
> * Interface ethA (static config with default route) comes up and sets this default route.
> * Interface ethB (in our case a USB-NIC for diagnostic purposes, DHCP with default route) comes up and *replaces* the former default route.
>
> scenario a)
> * Interface ethB goes down and removes its default route.
> * There does not exist a default route any longer. :(
>
> scenario b)
> * Interface ethA tries to go down.
> * This fails because removing the not-existing default route of config ethA fails. :(
That latter scenario sounds like a separate scripting bug: failing to
remove a route shouldn't prevent the interface going down. But I agree,
scenario A does sound like one that we should try to support and I guess
it oughtn't to be too hard to make the default scripts work with that.
There is still an unavoidable ambiguity about which default route should
actually be used, though: at some point something, somewhere is going to
have to decide whether the "new" or "old" default route is the preferred
one. I suppose the most sensible default policy would be to have the
newer one win.
p.
next prev parent reply other threads:[~2011-11-07 11:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-07 8:13 default route handling of udhcpc Steffen Sledz
2011-11-07 10:11 ` Phil Blundell
2011-11-07 10:31 ` Steffen Sledz
2011-11-07 10:57 ` Phil Blundell [this message]
2011-11-07 11:11 ` Steffen Sledz
2011-11-11 7:50 ` Steffen Sledz
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=1320663454.22985.643.camel@phil-desktop \
--to=philb@gnu.org \
--cc=Tim@Rikers.org \
--cc=openembedded-devel@lists.openembedded.org \
--cc=sledz@dresearch-fe.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.