Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#2942 - dhcpcd not renewing ip address

Attached to Project: Arch Linux
Opened by Ian Snow (enragedchip) - Sunday, 10 July 2005, 12:39 GMT
Last edited by arjan timmerman (blaasvis) - Wednesday, 27 July 2005, 09:49 GMT
Task Type Bug Report
Category System
Status Closed
Assigned To Judd Vinet (judd)
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

dhcpd isn't being shutdown properly so ip address aren't being released.
From this forum post http://bbs.archlinux.org/viewtopic.php?t=10977 it says that the dhcp deamon should be shutdown with the -k option inside the network script. However the network script seems to just use kill on the dhcpd process which sends the SIGTERM signal to the deamon and so it doesn't properly release the ip address.
This task depends upon

Closed by  Judd Vinet (judd)
Wednesday, 07 December 2005, 00:32 GMT
Reason for closing:  Fixed
Comment by Ian Snow (enragedchip) - Sunday, 10 July 2005, 12:51 GMT
a possible fix is to modify the ifdown() function in /etc/rc.d/network.
By changing
/bin/kill `cat /etc/dhcpc/dhcpcd-${1}.pid`
to
/bin/kill -HUP `cat /etc/dhcpc/dhcpcd-${1}.pid`

This would send the correct signal to dhcpd
Comment by Judd Vinet (judd) - Wednesday, 24 August 2005, 22:14 GMT
Hmmm... this depends on the behaviour we should have. As the manpage seems to suggest, when shutting down or rebooting a machine, it is beneficial to keep the dhcp cache to request the same IP address.

[snip]
-k Sends SIGHUP signal to the dhcpcd process that is currently run-
ning. If dhcpcd receives SIGHUP it will send DCHP_RELEASE mes-
sage to the server and destroy dhcpcd cache. In a case dhcpcd
receives SIGTERM which is normally used by shutdown(8) when
rebooting the system dhcpcd will not send DHCP_RELEASE and will
not destroy cache. When system boots dhcpcd will use cache to
request the same IP address from DHCP server which was assigned
before the system went down.
[/snip]


Suggestions?
Comment by Ian Snow (enragedchip) - Tuesday, 11 October 2005, 16:06 GMT
Well I've no longer got /bin/kill -HUP `cat /etc/dhcpc/dhcpcd-${1}.pid`
in /etc/rc.d/network due to upgrades and the ip address on my arch boxes keep climbing. Today its X.X.X.62 and tomorrow its likely to be X.X.X.64
This doesn't happen with windows and didn't with mandrake or gentoo and the router hasn't changed at all.
Comment by Aaron Griffin (phrakture) - Tuesday, 06 December 2005, 23:30 GMT
Ack! I originally thought dhcpcd -k was a good idea, but after reading Judd's justification, I'm torn. The reason I'm adding this here is because whatever the final decision is for /etc/rc.d/network, the same should be done for netcfg - as it stands now network uses "kill" and netcfg uses "dhcpcd -k"
Comment by Judd Vinet (judd) - Wednesday, 07 December 2005, 00:31 GMT
I'm going to leave both with the /bin/kill method.

Loading...