dhcpcd-discuss

Re: Addresses not deleted when cable pulled

Roy Marples

Sat Mar 03 09:28:29 2018

On 03/03/2018 02:26, jobhunts02@xxxxxxx wrote:
When I pull the cable to the interface on which I got an IPv4 address via DHCP, I would like the address to be deleted.  The reason it is not deleted is that state is NULL in ipv4ll_freedrop, which prevents ipv4_deladdr from being called.  If an interface has obtained an IPv4 & IPv6 address via DHCP, neither address is deleted when the cable is pulled.  If the interface only has an IPv6 address via DHCP, the address does get deleted when the cable is pulled.

Is there a way to ensure that addresses obtained via DHCP will be deleted when the cable is pulled?

Which OS are you using (please specify kernel version)?
Which dhcpcd version are you using?

I ask, because on NetBSD-8 and newer, the behaviour is to keep the addresses alive on carrier down as the kernel will deny their usage until they are revalidated by the kernel DaD's mechanism.

Now, this could also be a bug in dhcpcd where this is not respected for other kernels and the behaviour should be as you describe - all addresses dhcpcd is responsible for should be removed at carrier down.

Roy

Follow-Ups:
Re: Addresses not deleted when cable pulledRoy Marples
References:
Addresses not deleted when cable pulledjobhunts02
Archive administrator: postmaster@marples.name