dhcpcd-discuss

dhcpcd sometimes does not clear IPv6 addresses correctly

Nico Schottelius

Tue Nov 05 19:43:33 2019

Hey Roy,

while I am at finding bugs, after moving to a
different wifi network, dhcpcd sometimes does not clean the old lease:

2: wlp0s20f3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 24:ee:9a:54:c3:bf brd ff:ff:ff:ff:ff:ff
    inet 192.168.4.29/24 brd 192.168.4.255 scope global dynamic noprefixroute wlp0s20f3
       valid_lft 423sec preferred_lft 366sec
    inet6 2a0a:e5c1:111:111:6513:82f9:2b4f:593e/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 86398sec preferred_lft 14398sec
    inet6 2a0a:e5c0:10:bee:5fe8:6d2:b19a:3e8f/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 80447sec preferred_lft 8447sec
    inet6 fe80::e00d:528:9af3:e20a/64 scope link
       valid_lft forever preferred_lft forever

The 2a0a:e5c0:10:bee:5fe8:6d2:b19a:3e8f is from the previous network,
the 2a0a:e5c1:111:111:6513:82f9:2b4f:593e is from the current network.

After killing dhcpcd and flushing ips from the interface, I get this
result:

2: wlp0s20f3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 24:ee:9a:54:c3:bf brd ff:ff:ff:ff:ff:ff
    inet 192.168.4.29/24 brd 192.168.4.255 scope global dynamic noprefixroute wlp0s20f3
       valid_lft 591sec preferred_lft 516sec
    inet6 2a0a:e5c1:111:111:6513:82f9:2b4f:593e/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 86399sec preferred_lft 14399sec
    inet6 fe80::d65b:7147:4229:a67d/64 scope link
       valid_lft forever preferred_lft forever

I am currently running dhcpcd from the checkout and it complains about

script_runreason: /libexec/dhcpcd-run-hooks: No such file or directory

which is correct, because I just compiled it with the default
settings. I am not sure whether this might be related, but I am sure
that I have seen this problem before when running the system wide
installed dhcpcd.

I'm not yet sure how to trigger / verify this, but I have seen it some
times already and wanted to let you know.

Best,

Nico

--
Modern, affordable, Swiss Virtual Machines. Visit www.datacenterlight.ch

Follow-Ups:
Re: dhcpcd sometimes does not clear IPv6 addresses correctlyRoy Marples
Archive administrator: postmaster@marples.name