Re: [PATCH] dhcp-manager: add udhcpc support
- From: Dan Williams <dcbw redhat com>
- To: Yegor Yefremov <yegorslists googlemail com>
- Cc: networkmanager-list gnome org
- Subject: Re: [PATCH] dhcp-manager: add udhcpc support
- Date: Wed, 02 Apr 2014 15:42:59 -0500
On Sat, 2014-03-29 at 19:14 +0100, Yegor Yefremov wrote:
On Sat, Mar 29, 2014 at 7:06 PM, Yegor Yefremov
<yegorslists googlemail com> wrote:
Signed-off-by: Yegor Yefremov <yegorslists googlemail com>
This is my first attempt to add udhcpc. udhcpc starts, but nm doesn't
the info from it. How does dhcp.manager communicate with DHCP client?
Via lease file?
NM calls dhclient with a custom script. That script takes the
environment variables that dhclient hands to the script, and stuffs them
into a D-Bus message, which is then sent back to NetworkManager. The
script helper is src/dhcp-manager/nm-dhcp-helper.c. The NM daemon-side
code that parses that message is src/dhcp-manager/nm-dhcp-client.c in
ip4_options_to_config() and ip6_options_to_config().
dhcpcd at least used to use the same environment variable format as
dhclient does, so it uses the same codepaths. NM gives the same helper
script to dhcpcd as it does to dhclient.
But for udhcpc you'll have to look at how it passes the lease
information to helper scripts. That helper script could do the same
basic thing as the dhclient one, and just shove the environment into a
D-Bus message and hand it to NM. Then the daemon-side code would parse
that message and construct the internal NM DHCP configuration.
What do the udhcpc helpers look like?
Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]