When the state of the interface changes rapidly enough (usually due to
rapid wireless association changes in my experience), there is a race where dhclient is in the process of exiting due to the link going down when the link coming up causes devd to try and start a new one. This results is the link being up, but no dhclient running. Work around this race by checking a second time after a one second delay before refusing to start a dhclient instance due to one already being running. MFC after: 1 week
This commit is contained in:
parent
ddc5368476
commit
983daa047f
@ -21,7 +21,11 @@ dhclient_start()
|
||||
if [ -x /bin/pgrep ]; then
|
||||
pids=`/bin/pgrep -f "dhclient: $ifn(\$| .*)"`
|
||||
if [ -n "$pids" ]; then
|
||||
exit 0
|
||||
sleep 1
|
||||
pids=`/bin/pgrep -f "dhclient: $ifn(\$| .*)"`
|
||||
if [ -n "$pids" ]; then
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user