sd-dhcp6-client: Implement Elapsed Time option

System Internals / systemd - Patrik Flykt [linux.intel.com] - 10 September 2014 04:56 UTC

Implement Elapsed Time option as it is defined as MUST in RFC 3315, section 22.9. The elapsed time value is a 1/100th of a second with a max value of 0xffff, i.e. 655.35 seconds.

As the main loop might not be running yet when sd_dhcp6_client_start() is called, fetch the monotonic time directly and not from the event loop while in state DHCP6_STATE_STOPPED.

346e13a sd-dhcp6-client: Implement Elapsed Time option
src/libsystemd-network/sd-dhcp6-client.c | 40 ++++++++++++++++++++++--------
1 file changed, 30 insertions(+), 10 deletions(-)

Upstream: github.com


  • Share