Re: dhcpcd 6.11.3 core dumps on FreeBSD with link disconnect/connect sequence
Roy Marples
Thu Sep 01 11:38:37 2016
Hi Guy
On 30/08/2016 21:35, Guy Yur wrote:
> Adding IPv6 RA behavior for comparison (not affected by the DHCP/IPv4 patch).
> With new patch:
>
> 1. ifconfig lan0 down
> IPv4 address from DHCP is not removed.
> IPv6 from RA is also not removed.
>
> 2. disconnect link on lan0 followed by reconnect link
> IPv4 address from DHCP is removed and added back.
> IPv6 from RA is also removed and added back.
>
> 3. 'ifconfig lan0 down' followed by disconnect link
> IPv4 address from DHCP is not removed.
> IPv6 from RA is removed.
While I cannot work out the behaviour differences, I can say for sure
that FreeBSD sends RTM_DELADDR for each address on the interface when
marked down. You can see this using route monitor.
This behaviour strikes me as incorrect as the address is clearly still
on the interface.
For reference, NetBSD marks each address as IN{,6}_IFF_DETACHED and
sends RTM_NEWADDR (because the address is still there) while other BSD's
do nothing special.
As FreeBSD isn't in the habit of fixing any kernel issues I've reported
over the years with dhcpcd I guess we'll have to add a workaround -
maybe check with getifaddrs if the address still exists or not.
Roy
Archive administrator: postmaster@marples.name