All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steffen Sledz <sledz@dresearch-fe.de>
To: openembedded-devel <openembedded-devel@lists.openembedded.org>
Cc: Tim Riker <Tim@Rikers.org>
Subject: default route handling of udhcpc
Date: Mon, 07 Nov 2011 09:13:25 +0100	[thread overview]
Message-ID: <4EB79325.80107@dresearch-fe.de> (raw)

Recently we hit a problem with the default route handling of udhcpc.

The provided script busybox/files/simple.script (aka /etc/udhcpc.d/50default) removes all existing default routes before setting new routes. I think that's wrong.

If multiple interfaces offer default routes (via DHCP, static config, or any other way) there is no reason to prefer one over another (without having any additional information). So the script should only add the new default route. A short search in the internet brings up a lot of useful scenarios for multiple default routes.

So i tried to remove the part from the script which removes the existing routes. This led to a confusing situation.

If the script uses "route add default gw ..." (which is the case if /sbin/ip is not installed) everything seems to work fine.

But if /sbin/ip (from the busybox package) is installed the "ip route add default via ..." results in an "ip: RTNETLINK answers: File exists" error. In my opinion this is an error in the busybox ip implementation.

Opinions?

Regards,
Steffen

-- 
DResearch Fahrzeugelektronik GmbH
Otto-Schmirgal-Str. 3, 10319 Berlin, Germany
Tel: +49 30 515932-237 mailto:sledz@dresearch-fe.de
Fax: +49 30 515932-299
Geschäftsführer: Dr. Michael Weber, Werner Mögle;
Amtsgericht Berlin Charlottenburg; HRB 130120 B;
Ust.-IDNr. DE273952058



             reply	other threads:[~2011-11-07  8:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-07  8:13 Steffen Sledz [this message]
2011-11-07 10:11 ` default route handling of udhcpc Phil Blundell
2011-11-07 10:31   ` Steffen Sledz
2011-11-07 10:57     ` Phil Blundell
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=4EB79325.80107@dresearch-fe.de \
    --to=sledz@dresearch-fe.de \
    --cc=Tim@Rikers.org \
    --cc=openembedded-devel@lists.openembedded.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 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.