Open juhaj opened 8 months ago
You should not need to do anything with dhcpcd, it listens to carrier changes. It also listens to hardware (MAC) address changes just fine which IIRC can only be made when the interface is in the down state. You've not said what dhcpcd version you're running? I do recall changing how carrier works on Linux wireless recently and that latest version reflects that.
The behaviour of dhcpcd when the interface MAC changes is odd. It seems that dhcpcd tries to use whatever MAC the interface had when dhcpcd started even if it has been changed since e.g. by iwd when changing to a different wifi AP. Sometimes dhcpcd just simply stops sending requests at all and neither
dhcpcd --rebind
nordhcpcd --renew
causes it to send a new one.My expectation would be that this sequence (both dhcpcd and iwd are running) gets me a new IP on the new wifi:
but instead I only get the IPv6 RA stateless addresses (if the network of the new AP has any). If I instead restart the whole daemon, things work:
It looks to me as if dhcpcd reads the LL address once at startup and if that changes (as it will on most modern systems when changing networks), it does not notice and reread the new value.
The config file is the default supplied (comments removed), though I tried quite a few different options, too:
Another oddity is that the RA-derived addresses of the old network are not deleted - I would have expected them to be deleted, but maybe that is iwd's job when it disconnects the AP?