[systemd-devel] [PATCH 0/6] Init-Reboot and some minor fixes

Patrik Flykt patrik.flykt at linux.intel.com
Fri Jan 31 01:31:19 PST 2014


	Hi,

This patch set implements DHCP Init-Reboot support for libsystemd-dhcp
and fixes a few other minor things.

Init-Reboot support is implemented by patch 03. If the previous IPv4
address is set before starting the DHCP procedure, the code now tries
starting with Init-Reboot as described in RFC 2131. As this cuts off
broadcasting Discovers and waiting for the first Offer to arrive, the
address acquisition time is reduced by a significant amount. Should
the Init-Reboot not complete successfully or a timeout occurs before
the reply is received, the state machine is reset and a full DHCP
exchange is done instead. To utilize Init-Reboot, systemd-networkd
would need to persistently store the client IP address used last time.

Patches 01 and 02 are trivial cleanups and patches 04 and 05 fix two
minor details. Patch 06 has a bit more meat in it. It turns out that the
'secs' field is to be updated only with each sent DHCP Discover and
not constantly for each message. The commit message contains a link
to the discussion on the IETF DHC WG mailing list some years ago.


Cheers,

	Patrik


Patrik Flykt (6):
  libsystemd-dhcp: DNS name option must be a multiple of 4 bytes
  libsystemd-dhcp: Rename function to be clearer that options are parsed
  libsystemd-dhcp: Add Init-Reboot support
  libsystemd-dhcp: Compute UDP checksum only if set
  libsystemd-dhcp: Fix stopping of DHCP client
  libsystemd-dhcp: Update secs field only when sending Discover

 src/libsystemd-dhcp/sd-dhcp-client.c | 126 ++++++++++++++++++++++++-----------
 1 file changed, 87 insertions(+), 39 deletions(-)

-- 
1.8.5.2



More information about the systemd-devel mailing list