CVSROOT:        /cvs
Module name:    src
Changes by:     flor...@cvs.openbsd.org 2021/09/14 01:51:51

Modified files:
        sbin/dhcpleased: frontend.c 

Log message:
When the dhcp server is unreachable via unicast UDP retry broadcast.

The only indication we get is sendto(2) failing, so if our UDP packet
is silently dropped somewhere we won't notice.

This has been observed in the wild with a dhcp server at the remote
end of a VPN. The dhcp server is reachable via broadcast so we get an
initial lease. However the server is not in the same subnet as the
lease we are getting so to reach it unicast we depend on a default
route being set. When the VPN goes down we lose the default route [*]
and when dhcpleased then tries to renew the lease (unicast), sendto(2)
fails with "network unreachable".

[*] The exact mechanics on how this happens are unclear. I.e. why
didn't dhcpleased(8) see a link-state change and transitioned to
REBOOTING / INIT? Regardless, we shouldn't ignore sendto(2) errors.

Reported by stsp, OK benno

Reply via email to