Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: dhcpcd ignores netmask from server, installs /8 or /24 instead



On 13/12/2014 04:37, John D. Baker wrote:
> On Fri, 12 Dec 2014, John D. Baker wrote:
> 
>> Following an update and a reboot, 'dhcpcd' ignores the "/20" netmask
>> presented by the ISP's DHCP server and instead installs the address with
>> a "/8" netmask instead (the address assigned by the DHCP server would
>> otherwise be a Class A were it not for the "/20" netmask).
> 
> With dhcpcd v6.4.3 in netbsd-7, this appears to be related to the use of
> the "noalias" directive.  While using "noalias" to prevent the dynamic
> address being installed as an alias, a bogus netmask would be used.
> 
> Without "noalias", the server-provided netmask is used.

This is fixed here:
http://roy.marples.name/projects/dhcpcd/ci/1d6c70b7ce81a34fd5a2e03bc35cac6a675f7a8b?sbs=0

Basically noalias now removes any existing addresses we don't want when
we adding/refreshing the one we do want.

> Some tweaks to "dhcpcd.exit-hook" provide the desired behavior with
> respect to installing/removing additional alias addresses.  Basically,
> install the alias on any nominal "success" case that may cause installation
> of a new address (BOUND, IPV4LL, STATIC, TIMEOUT) and remove on preparatory
> cases (PREINIT, REBIND, REBOOT, STOP).

Good!

Roy


Home | Main Index | Thread Index | Old Index