Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] busybox: Enable domain search list support in udhcpc
@ 2019-04-08 11:00 Alexey Brodkin
  2019-08-03 15:49 ` Yann E. MORIN
  0 siblings, 1 reply; 5+ messages in thread
From: Alexey Brodkin @ 2019-04-08 11:00 UTC (permalink / raw)
  To: buildroot

This is useful in networks with internal resources as it allows
to use much shorter names.

E.g. instead of "server.internal.company.com" it's possible
to use just "server" if DHCP server is configured with:
---------------------------->8-----------------------
option domain-search "internal.company.com";
---------------------------->8-----------------------

This improvement consists of 2 parts:

1. Enable handling of RFC3397 so DHCP client is ready for processing
   corresponding data from DHCP server.

2. Some DHCP servers always send out search list if it is set in server's
   configuration and some servers only provide search list if client
   asks for that (sending list of options it expectes to get).

   And exactly for those stubborn DHCP servers we need to add "-O search"
   to udhcp's command line via CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Ignacy Gawedzki <ignacy.gawedzki@green-communications.fr>
Cc: Peter Korsgaard <peter@korsgaard.com>
---
 package/busybox/busybox.config | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/busybox/busybox.config b/package/busybox/busybox.config
index 1d9560d655..ab04854c83 100644
--- a/package/busybox/busybox.config
+++ b/package/busybox/busybox.config
@@ -967,9 +967,9 @@ CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
 # CONFIG_FEATURE_UDHCP_PORT is not set
 CONFIG_UDHCP_DEBUG=0
 CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
-# CONFIG_FEATURE_UDHCP_RFC3397 is not set
+CONFIG_FEATURE_UDHCP_RFC3397=y
 CONFIG_FEATURE_UDHCP_8021Q=y
-CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"
+CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n -O search"
 
 #
 # Print Utilities
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] busybox: Enable domain search list support in udhcpc
  2019-04-08 11:00 [Buildroot] [PATCH] busybox: Enable domain search list support in udhcpc Alexey Brodkin
@ 2019-08-03 15:49 ` Yann E. MORIN
  2019-08-03 16:03   ` Peter Korsgaard
  2019-08-30 20:32   ` Peter Korsgaard
  0 siblings, 2 replies; 5+ messages in thread
From: Yann E. MORIN @ 2019-08-03 15:49 UTC (permalink / raw)
  To: buildroot

Alexey, All,

On 2019-04-08 14:00 +0300, Alexey Brodkin spake thusly:
> This is useful in networks with internal resources as it allows
> to use much shorter names.
> 
> E.g. instead of "server.internal.company.com" it's possible
> to use just "server" if DHCP server is configured with:
> ---------------------------->8-----------------------
> option domain-search "internal.company.com";
> ---------------------------->8-----------------------
> 
> This improvement consists of 2 parts:
> 
> 1. Enable handling of RFC3397 so DHCP client is ready for processing
>    corresponding data from DHCP server.
> 
> 2. Some DHCP servers always send out search list if it is set in server's
>    configuration and some servers only provide search list if client
>    asks for that (sending list of options it expectes to get).
> 
>    And exactly for those stubborn DHCP servers we need to add "-O search"
>    to udhcp's command line via CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS.
> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Ignacy Gawedzki <ignacy.gawedzki@green-communications.fr>
> Cc: Peter Korsgaard <peter@korsgaard.com>

Acked-by: Yann E. MORIN <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  package/busybox/busybox.config | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/package/busybox/busybox.config b/package/busybox/busybox.config
> index 1d9560d655..ab04854c83 100644
> --- a/package/busybox/busybox.config
> +++ b/package/busybox/busybox.config
> @@ -967,9 +967,9 @@ CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
>  # CONFIG_FEATURE_UDHCP_PORT is not set
>  CONFIG_UDHCP_DEBUG=0
>  CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
> -# CONFIG_FEATURE_UDHCP_RFC3397 is not set
> +CONFIG_FEATURE_UDHCP_RFC3397=y
>  CONFIG_FEATURE_UDHCP_8021Q=y
> -CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"
> +CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n -O search"
>  
>  #
>  # Print Utilities
> -- 
> 2.16.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] busybox: Enable domain search list support in udhcpc
  2019-08-03 15:49 ` Yann E. MORIN
@ 2019-08-03 16:03   ` Peter Korsgaard
  2019-08-04  7:51     ` Alexey Brodkin
  2019-08-30 20:32   ` Peter Korsgaard
  1 sibling, 1 reply; 5+ messages in thread
From: Peter Korsgaard @ 2019-08-03 16:03 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > Alexey, All,
 > On 2019-04-08 14:00 +0300, Alexey Brodkin spake thusly:
 >> This is useful in networks with internal resources as it allows
 >> to use much shorter names.
 >> 
 >> E.g. instead of "server.internal.company.com" it's possible
 >> to use just "server" if DHCP server is configured with:
 ----------------------------> 8-----------------------
 >> option domain-search "internal.company.com";
 ----------------------------> 8-----------------------
 >> 
 >> This improvement consists of 2 parts:
 >> 
 >> 1. Enable handling of RFC3397 so DHCP client is ready for processing
 >> corresponding data from DHCP server.
 >> 
 >> 2. Some DHCP servers always send out search list if it is set in server's
 >> configuration and some servers only provide search list if client
 >> asks for that (sending list of options it expectes to get).
 >> 
 >> And exactly for those stubborn DHCP servers we need to add "-O search"
 >> to udhcp's command line via CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS.
 >> 
 >> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
 >> Cc: Ignacy Gawedzki <ignacy.gawedzki@green-communications.fr>
 >> Cc: Peter Korsgaard <peter@korsgaard.com>

 > Acked-by: Yann E. MORIN <yann.morin.1998@free.fr>

Committed, thanks.

Notice: For a single domain, I believe you can just set

option domain-name "internal.company.com"

In the DHCP server config, which will work out of the box using the
classic (option 15) domain name option.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] busybox: Enable domain search list support in udhcpc
  2019-08-03 16:03   ` Peter Korsgaard
@ 2019-08-04  7:51     ` Alexey Brodkin
  0 siblings, 0 replies; 5+ messages in thread
From: Alexey Brodkin @ 2019-08-04  7:51 UTC (permalink / raw)
  To: buildroot

Hi Peter,

> -----Original Message-----
> From: Peter Korsgaard <jacmet@gmail.com> On Behalf Of Peter Korsgaard
> Sent: Saturday, August 3, 2019 7:04 PM
> To: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Alexey Brodkin <abrodkin@synopsys.com>; buildroot at busybox.net; Ignacy Gawedzki
> <ignacy.gawedzki@green-communications.fr>; ARC Buildroot mailing list <arc-buildroot@synopsys.com>
> Subject: Re: [PATCH] busybox: Enable domain search list support in udhcpc
> 
> >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> 
>  > Alexey, All,
>  > On 2019-04-08 14:00 +0300, Alexey Brodkin spake thusly:
>  >> This is useful in networks with internal resources as it allows
>  >> to use much shorter names.
>  >>
>  >> E.g. instead of "server.internal.company.com" it's possible
>  >> to use just "server" if DHCP server is configured with:
>  ----------------------------> 8-----------------------
>  >> option domain-search "internal.company.com";
>  ----------------------------> 8-----------------------
>  >>
>  >> This improvement consists of 2 parts:
>  >>
>  >> 1. Enable handling of RFC3397 so DHCP client is ready for processing
>  >> corresponding data from DHCP server.
>  >>
>  >> 2. Some DHCP servers always send out search list if it is set in server's
>  >> configuration and some servers only provide search list if client
>  >> asks for that (sending list of options it expectes to get).
>  >>
>  >> And exactly for those stubborn DHCP servers we need to add "-O search"
>  >> to udhcp's command line via CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS.
>  >>
>  >> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
>  >> Cc: Ignacy Gawedzki <ignacy.gawedzki@green-communications.fr>
>  >> Cc: Peter Korsgaard <peter@korsgaard.com>
> 
>  > Acked-by: Yann E. MORIN <yann.morin.1998@free.fr>
> 
> Committed, thanks.
> 
> Notice: For a single domain, I believe you can just set
> 
> option domain-name "internal.company.com"

Sure that's perfectly possible.
But in some networks (for example) like we have in the company
they do use search domains and w/o it boards connected to the network
get incomplete configuration and cannot access internal resources.

-Alexey

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] busybox: Enable domain search list support in udhcpc
  2019-08-03 15:49 ` Yann E. MORIN
  2019-08-03 16:03   ` Peter Korsgaard
@ 2019-08-30 20:32   ` Peter Korsgaard
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2019-08-30 20:32 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > On 2019-04-08 14:00 +0300, Alexey Brodkin spake thusly:
 >> This is useful in networks with internal resources as it allows
 >> to use much shorter names.
 >> 
 >> E.g. instead of "server.internal.company.com" it's possible
 >> to use just "server" if DHCP server is configured with:
 ----------------------------> 8-----------------------
 >> option domain-search "internal.company.com";
 ----------------------------> 8-----------------------
 >> 
 >> This improvement consists of 2 parts:
 >> 
 >> 1. Enable handling of RFC3397 so DHCP client is ready for processing
 >> corresponding data from DHCP server.
 >> 
 >> 2. Some DHCP servers always send out search list if it is set in server's
 >> configuration and some servers only provide search list if client
 >> asks for that (sending list of options it expectes to get).
 >> 
 >> And exactly for those stubborn DHCP servers we need to add "-O search"
 >> to udhcp's command line via CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS.
 >> 
 >> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
 >> Cc: Ignacy Gawedzki <ignacy.gawedzki@green-communications.fr>
 >> Cc: Peter Korsgaard <peter@korsgaard.com>

Committed to 2019.02.x and 2019.05.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-08-30 20:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-08 11:00 [Buildroot] [PATCH] busybox: Enable domain search list support in udhcpc Alexey Brodkin
2019-08-03 15:49 ` Yann E. MORIN
2019-08-03 16:03   ` Peter Korsgaard
2019-08-04  7:51     ` Alexey Brodkin
2019-08-30 20:32   ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox