chiark / gitweb /
sd-dhcp-client: make sure timers fire immediately
authorTom Gundersen <teg@jklm.no>
Tue, 18 Mar 2014 13:13:01 +0000 (14:13 +0100)
committerTom Gundersen <teg@jklm.no>
Tue, 18 Mar 2014 14:53:32 +0000 (15:53 +0100)
commitd23c45bfccb3ed6e2628e6d12b4ea12b8c920ab9
treece075ef19d5d01bc63a543994d3c253799942320
parent4dd5da7f7d37f964fe95b0f0d451d7843a34591d
sd-dhcp-client: make sure timers fire immediately

The default slack caused there to be a delay before timers fired. Solve it
by setting timers that should trigger immediately to trigger far in the past.

This brings down the ideal-case dhcp lease acquisition time from about 500ms to
about 50ms (over a veth pair, so no network latency involved).

All the rest of the time (except for ~0.5ms) is spent in the bind() call in,
dhcp_network_bind_raw_socket(). I don't know if there is anything to be done
about that though...
src/libsystemd-network/sd-dhcp-client.c