Re: Looking for a way to obtain offered gateway(s) from a link's DHCP but not apply them.
Roy Marples
Thu Mar 12 21:28:04 2015
On Thursday 12 Mar 2015 13:17:24 Malcolm Bofors wrote:
> > should provide the IPv4 dhcp lease.
> > You want to look for either classless_static_routes= and find the
> > 0.0.0.0/0 entry (router IP after it) or look at the routers=
> > If classless_static_routes is set, then routers is ignored.
>
> This sounds like a potential "gotcha" in the face of upstream changes.
> Is there a field/entry in that lease dump that conveys the actual
> gateway(s) that would apply subject to these policy-related decisions
> vis-a-vis classless_static_routes overriding the routers one? I'm happy
> to code in the logic, but I worry that my understanding of all of the
> rules of when to apply which field in which situation is incomplete.
I'm not sure I fully understand.
Classless Static Routes are mutually exclusive to the Routers and Static
Routes options. You either have one or the other.
dhcpcd will always prefer Classless Static Routes as noted by RFC3442.
However, dhcpcd will still list both options when passed to the hooks and dump
lease.
> Thanks for your reply and all of the hard work you've put into dhcpcd.
You're welcome :)
Roy
Archive administrator: postmaster@marples.name