Policy-based routing, NetworkManager, and DHCP/RA

I’ve got a Rocky 8 box acting as a router with multiple WAN links. I’ve figured out how to set up policy-based routing with NetworkManager so that a speedtest-cli with --source set to a WAN link’s IPv4 address actually goes out that link. The WAN link addresses are assigned by DHCP for IPv4 and by RA for IPv6. Where can I hook those assignments to dynamically change my policy routing rules to use the new address and gateway? Do I use an NM hook for that?

See my thread here on getting speedtest-cli to work on a multihomed gateway, which might be helpful for others trying to get that working.

Most of the “secret sauce” can be found here:

I think I found the answer to my question: