On Sun 18/07/2021 10:38, Florian Obser wrote: > On 2021-07-18 01:02 +02, Bjorn Ketelaars <b...@openbsd.org> wrote: > > On Sat 17/07/2021 17:12, Florian Obser wrote: > >> > >> > >> On 17 July 2021 13:16:59 CEST, Bjorn Ketelaars <b...@openbsd.org> wrote: > >> >An inconsistency exists between dhclient(8) and dhcpleased(8) when > >> >receiving the Classless Static Routes option: dhcpleased creates a > >> >default route, while dhclient does not. > >> > > >> >If I'm not mistaken, the behaviour of dhclient is correct. From > >> >rfc3442: > >> >"If the DHCP server returns both a Classless Static Routes option and a > >> >Router option, the DHCP client MUST ignore the Router option." > >> > > >> > >> Correct. But you are fixing it in the wrong place. It doesn't say to > >> ignore a default route, which can be transmitted via classless static > >> routes option (it's 0/0). > > > > That makes sense. New diff... > > Not quite. This assumes that the router option comes first, a DHCP > server could send us something like this: > > DHO_ROUTERS > DHO_CLASSLESS_STATIC_ROUTES > DHO_ROUTERS > DHO_CLASSLESS_STATIC_ROUTES > > Which would be quite broken, but hey... > > How about this? Do you actually have a test case for this?
I have a simple test case: DHCP server from ISP (more specific IPTV platform from KPN), which sends a single router option followed by a classless static router option. With your diff the router option is ignored. This fixes my issue, thank you!