HomeFreeBSD

dhclient-script: cope with /32 address leases

Description

dhclient-script: cope with /32 address leases

On certain cloud platforms (Google Cloud, Packet.net and others) the
DHCP server offers a /32 address. This makes adding the default route
fail since it is not reachable via any interface. Linux's
dhclient-script seem to usually have a special case for that and
explicitly adds an interface route to the router's address.

FreeBSD's dhclient-script already has a special case for when the router
address is the same as the leased address. Now also add one for when
it's a different address that doesn't fall in the interface's subnet.

PR: 241792
Event: Aberdeen hackathon 2022
Submitted by: sigsys@gmail.com
Reviewed by: dch, kp, bz (+1 on the idea, not reviewed), thj
MFC after: 1 week

(cherry picked from commit fd6ecc184dbc64b9b3f7866b34812fb93df62925)

Details

Provenance
kpAuthored on Oct 5 2022, 10:11 AM
Parents
rG87d762392635: libusb(3): Implement libusb_interrupt_event_handler() by exposing existing…
Branches
Unknown
Tags
Unknown