Where is this IPv6 address coming from?

After some experimentation I found the following command can be used:

ip monitor

It will display a list of what's happening. Run it in one terminal, restart the network interface in another, and you'll see a line printed as each IP address is removed and then re-added.

It still doesn't explain exactly where the IP is coming from, but it did tell me it was an ra (Router Advertisement) which allowed me to go looking at my router config.

In my case I was advertising the same fdaa::/64 prefix as I had assigned as a static IP (assuming a static IP in this subnet would prevent a dynamic one from being assigned) but instead I ended up with both a static and a dynamic IP in the same subnet, which caused the problems. I'm still in two minds as to whether this is a bug.

After a lot of thought I changed the router to advertise a different prefix (actually a different subnet in the same ULA /48, so fdaa:0:0:1/64) because this way both subnets fit in the same ULA assignment but being different subnets they don't cause a machine to reply from the wrong IP when it has IPs belonging to both subnets.