mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
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
1 changed files with 5 additions and 1 deletions
|
|
@ -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…
Reference in a new issue