xapi-project / xcp-networkd

The XCP networking daemon
Other
14 stars 42 forks source link

CA-347400: Pass lease file when stopping dhclient #183

Closed rosslagerwall closed 3 years ago

rosslagerwall commented 3 years ago

xcp-networkd calls "dhclient -r" which releases the current lease and stops the existing dhclient process. For some reason, dhclient skips calling dhclient-script unless the lease file is given on the command-line. This means that the dhclient hooks are not run which in turn means that NTP servers obtained from DHCP are not removed.

Fix this by simply passing the lease file when stopping dhclient.

Signed-off-by: Ross Lagerwall ross.lagerwall@citrix.com