DHCPv6-PD confused by multiple advertisements

I’m seeing an interesting behavior on my RB751G running 5.18. I have my box acting as a home router connected to a cable modem with an ISP doing DHCPv6-PD. While I can sometimes get a prefix into a pool, most of the time the ipv6 dhcp-client errors after a while with no prefix allocated.

When I do a packet capture of the outward facing interface, I get an interesting result. I see the DHCPv6 Solicit message go out and I receive two different prefix advertisements from 2 different server ids. The dhcp-client sends back a request packet with the prefix from the first advertisement, but uses the server id of the second advertisement, so the second dhcp server sends back a negative reply.

I’ve attached a text capture file showing what I’m seeing. There’s two attempts in it, one with the first dhcp server responding first, the other has the second server responding first.
cap.txt (20.7 KB)

Thank you for the report we can reproduce the problem. Fix will be in the upcoming version.