[systemd-devel] [PATCH 00/11] Finalize initial DHCP support

Patrik Flykt patrik.flykt at linux.intel.com
Fri Dec 20 07:16:09 PST 2013


	Hi,

The first seven patches fix a few issues with the current code.

Patch 09 adds DHCP lease renewing support when timer T1 triggers. Using
the UDP socket sending implementation in patch 08, the DHCP lease
renewal is unicasted to the DHCP server. This means that systemd-network
should have applied the acquired IP address and default route to the
proper interface before timer T1 triggers.

Common code is factored out in patch 10, which makes patch 11 containing
the broadcasting of DHCP Requests at timer T2 trigger quite small.

At this point in time support for fetching DNS, NTP, etc options from
the DHCP message(s) is still missing, sorry for that. Also Init-Reboot
state support is missing; adding that functionality can speed up the
address acquisition if the host comes back to a known network where
it still has an unexpired lease.


Please review,


       Patrik


Patrik Flykt (11):
  libsystemd-dhcp: Use be32_t for IP addresses in network order.
  libsystemd-dhcp: Return proper error if bind fails
  libsystemd-dhcp: Return proper error on OOM
  libsystemd-dhcp: Unref event source before closing socket
  libsystemd-dhcp: Fix receiving of other message when expecting Ack
  libsystemd-dhcp: Fix checksum computation for buffer with odd size
  libsystemd-dhcp: Check test result without casting value
  libsystemd-dhcp: Add functions for sending unicast UDP messages
  libsystemd-dhcp: Handle T1 Renewing timeout
  libsystemd-dhcp: Factor out common code initializing events
  libsystemd-dhcp: Handle T2 Rebinding timeout

 src/libsystemd-dhcp/dhcp-client.c      |  249 ++++++++++++++++++++++++--------
 src/libsystemd-dhcp/dhcp-internal.h    |    3 +
 src/libsystemd-dhcp/dhcp-network.c     |   43 +++++-
 src/libsystemd-dhcp/dhcp-protocol.h    |    8 +-
 src/libsystemd-dhcp/test-dhcp-client.c |   26 ++--
 5 files changed, 250 insertions(+), 79 deletions(-)

-- 
1.7.10.4



More information about the systemd-devel mailing list