FS#35760 - [netctl] 1.1-1 DHCP lease is released when profile is deactivated
Attached to Project:
Arch Linux
Opened by Alexander Blinne (Sunday) - Tuesday, 11 June 2013, 18:25 GMT
Last edited by Jouke Witteveen (jouke) - Tuesday, 16 July 2013, 09:44 GMT
Opened by Alexander Blinne (Sunday) - Tuesday, 11 June 2013, 18:25 GMT
Last edited by Jouke Witteveen (jouke) - Tuesday, 16 July 2013, 09:44 GMT
|
Details
Description:
When a dhcp ethernet connection is deactivated and dhcpcd is used, the dhcp lease will be released. If dhclient is used, it won't. This is inconsistent. The corresponding function is ip_unset() in /usr/lib/network/ip: case ${DHCPClient:-dhcpcd} in dhcpcd) if [[ -f "/run/dhcpcd-$Interface.pid" ]]; then do_debug dhcpcd -qk "$Interface" >/dev/null fi ;; dhclient) if [[ -f "/run/dhclient-$Interface.pid" ]]; then # Alternatively, use -r instead of -x to also release the lease do_debug dhclient -q -x "$Interface" -pf "/run/dhclient-$Interface.pid" >/dev/null fi ;; esac As a quick fix I propose the following change to the dhcpcd part: # Alternatively, use -k instead of -x to also release the lease do_debug dhcpcd -qx "$Interface" >/dev/null This will make the behaviour between both dhcp client implementations consistent. In the long run I think the releasing of the dhcp lease should be configurable independently from the dhcp client implementation. Additional info: * package version(s) netctl 1.1-1 * Discussion in forum https://bbs.archlinux.org/viewtopic.php?id=159945 Steps to reproduce: Bring dhcp profile down and up again while DHCPClient=dhcpcd and you may get a different IP (depending on the dhcp server settings). If DHCPClient=dhclient is used, the same IP will be used again. |
This task depends upon
Closed by Jouke Witteveen (jouke)
Tuesday, 16 July 2013, 09:44 GMT
Reason for closing: Fixed
Additional comments about closing: bf493
Tuesday, 16 July 2013, 09:44 GMT
Reason for closing: Fixed
Additional comments about closing: bf493
The question for now is: what should be the default, to release or not to release the lease
It might still be useful to be able to override the configured behaviour when a profile is manually deactivated ($ netctl stop my-profile-which-does-not-release --release-dhcp-lease). So one could still release the lease explicitly one wants to have a new ip address for whatever reason.