After a power outage, my freebsd router is up within 30 seconds, but the ISP's modem takes a good 5 minutes before it turns on its LAN ports, and 5 more minutes for the ISP's dhcp infrastructure and internet routing to start working again. Previously (12.0), freebsd handled this outage gracefully, but subsequent code changes to dhclient and startup scripts broke it in multiple places.
I have already patched out a hardcoded 10-second timeout for link wait (previously fbsd either booted slow enough, or its interfaces started in 'active' state?). There is also the dhcprequest timeout, which if set too low, will make dhclient give up and reuse a valid saved lease. I've just discovered that previously this worked, and now it doesn't.
I wish to know why this is happening. have checked the sbin/dhclient source history but did not immediately see a relevant change. The function 'state_panic()' hasn't been touched in 19 years, however it is complex and relies on global state, so one of the recent changes may have affected how it executes. It also doesn't do things directly but sets up a 'script' and executes it, meaning there's more complexity underneath and it's impossible to follow via cursory code review.
I have already patched out a hardcoded 10-second timeout for link wait (previously fbsd either booted slow enough, or its interfaces started in 'active' state?). There is also the dhcprequest timeout, which if set too low, will make dhclient give up and reuse a valid saved lease. I've just discovered that previously this worked, and now it doesn't.
12.0 | 14.0 |
---|---|
Code:
|
Code:
|
I wish to know why this is happening. have checked the sbin/dhclient source history but did not immediately see a relevant change. The function 'state_panic()' hasn't been touched in 19 years, however it is complex and relies on global state, so one of the recent changes may have affected how it executes. It also doesn't do things directly but sets up a 'script' and executes it, meaning there's more complexity underneath and it's impossible to follow via cursory code review.