[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: udhcpc: udhcpc not stopping due to Ethernet power down
From:       Alexander Dahl <ada () thorsis ! com>
Date:       2018-06-14 7:15:29
Message-ID: 1656132.lMDOVMdWor () ada
[Download RAW message or body]

Hei hei,

Am Mittwoch, 13. Juni 2018, 15:40:43 CEST schrieb Bryan Evenson:
> Link detection errors are treated as link down/link up, so when the router's
> Ethernet port powers down then ifdown is called.  Unfortunately I don't
> have strace installed on this system to test, but from reading the source
> code for ifdown I believe it should be sending a SIGTERM to udhcpc.

It should, if you have a serial console you could check by calling ifdown 
manually (maybe disable ifplugd first), this is what I get:

	$ ifdown -v eth0
	run-parts /etc/network/if-down.d
	kill `cat /var/run/udhcpc.eth0.pid` 2>/dev/null
	ip addr flush dev eth0
	ip link set eth0 down
	run-parts /etc/network/if-post-down.d

You can see the SIGTERM sent by kill to the PID in the pid file created on 
start of the udhcpc. I can confirm udhcpc is not running anymore after that.
 
> I do have another system that is easier for me to test with that is also
> running Busybox version 1.24.1.  I'll try to run some tests later today to
> confirm that udhcpc is getting a SIGTERM signal.  If this is the case, then
> I assume the answer is to upgrade to at least 1.28.2 to grab the fix.

Maybe there's something wrong with getting the right PID? If you have multiple 
instances of udhcpc running, but only one pid file, that could cause trouble? 

Side note: I use ifplugd with the -l option, but don't start udhcpc explicitly 
on startup. ifup sorts that out based on the current network settings.

HTH & Greets
Alex

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic