All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
To: David Laight <David.Laight@ACULAB.COM>,
	"buildroot@buildroot.org" <buildroot@buildroot.org>
Subject: Re: [Buildroot] DHCP default.script
Date: Mon, 29 Nov 2021 22:15:42 +0100	[thread overview]
Message-ID: <cb21affd-1ab4-ddd5-1cbe-03861208eda4@green-communications.fr> (raw)
In-Reply-To: <e3ba29bfce7a4de3aa95a105146eadbf@AcuMS.aculab.com>

On 29/11/2021 18:19, David Laight wrote:
> I was looking at the DHCP default.script (that ends up in /usr/share/udhcpd)
> and found some quite nasty problems.
> I've fixed them locally and ended up with the script below.
> (Which is probably easier to read than a diff.)
> I've ripped out ahavi - we don't need it (and i don't know what it does!).

It gives IPv4 link-local addresses (169.254.0.0/16) when DHCP fails.

> 2) On a 'renew' it would delete all routes, not just the one added
>     by dhcp.
>     The 'proto dhcp' parameter can be used to identify routes added by
>     dhcp so that they are the only ones deleted (this matches my desktop).

Busybox's iproute is very limited (e.g. it does not display the proto 
when listing routes) and 'dhcp' is not a builtin proto, so this needs a 
/etc/iproute2/rt_protos file to list 'dhcp'...

> nl="$(printf '\nx')"
> nl="${nl%x}"

or just

nl='
'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2021-11-29 21:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-29 17:19 [Buildroot] DHCP default.script David Laight
2021-11-29 21:15 ` Nicolas Cavallari [this message]
2021-11-30  9:10   ` David Laight

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=cb21affd-1ab4-ddd5-1cbe-03861208eda4@green-communications.fr \
    --to=nicolas.cavallari@green-communications.fr \
    --cc=David.Laight@ACULAB.COM \
    --cc=buildroot@buildroot.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.