I'd like to do some things in BOUND6 exit hook, for which it's necessary to know what prefix was just assigned to me. But for some reason, the $new_delegated_dhcp6_prefix variable is only available in the DELEGATED6 hook. And that's a bit inconvenient, because DELEGATED6 runs on renewal of the lease, but I only want to do those things if it's actually a new lease, new prefix, and things changed. Which can be once a month. But DELEGATED6 runs every half an hour or so.
So I had to resort to some hacks, to work out if the prefix has changed. But maybe I'm missing something, and there's a reasonable way to work out the new address in the BOUND6 exit hook?
I grep my dhcpcd.log for the string "delegated prefix". Really dirty but it works and my Docker containers have IPv6 access again when a new prefix was delegated by my router.
I'd like to do some things in BOUND6 exit hook, for which it's necessary to know what prefix was just assigned to me. But for some reason, the $new_delegated_dhcp6_prefix variable is only available in the DELEGATED6 hook. And that's a bit inconvenient, because DELEGATED6 runs on renewal of the lease, but I only want to do those things if it's actually a new lease, new prefix, and things changed. Which can be once a month. But DELEGATED6 runs every half an hour or so.
So I had to resort to some hacks, to work out if the prefix has changed. But maybe I'm missing something, and there's a reasonable way to work out the new address in the BOUND6 exit hook?