Getip call using curl returns LAN IP

Two routers with the same hardware model and the same system version are connected to the Internet through PPPOE dial-up. After the dial-up is successful, the IPv6 and IPv6-PD pppoe-wan interface v4 and v6 public network addresses are obtained normally, but the curl --interface pppoe-wan is executed. http://v6.***.org/getip When this command to get the public network IP, a device can correctly return the v6 address of the pppoe-wan interface, but a device returns the address of br-lan. why is that?

when connected to the router returning the LAN ip, which IP do you get, if you use a plain browser ?

(modified the subject)

I want to get is the public network v6 address of the pppoe-wan interface. The question here is that the environment is the same (the same model of device, the same system and version of the device, and the same curl version) Why are the results different? Is it possible that curl will choose another available interface when an address is unavailable?

that could be the case, but the BR-LAN IP it's returning isn't public, it it ?.
so in theory if there's no WAN connection available, the call should fail.

I also think that if the IPv6 address of the pppoe-wan interface is unavailable, it should return an error instead of the br-lan address. The previous statement is just a guess for no reason. The IPv6 address of the pppoe-wan interface should be available. All in all it feels weird

Then you probably need to force curl to only use ipv6, now it probably swaps over to ipv4 if ipv6 doesn't work.

Enable verbosity, to see what's actually going on.

I think it should not be a problem with the IP version, because: 1. pppoe-wan itself has a v4 v6 address at the same time, even if it wants to switch to a v4 address, then the pppoe-wan address I specified should be used instead, and it should not be switched to another address. The address of the br-lan interface. 2. The same command is executed in another setting and the result is correct what I want.

After testing again, I found that curl --interface pppoe-wan, changed to use pppoe-wan interface ipv6 address to specify the interface curl --interface 240e:198** *:3b00 returns the correct pppoe-wan interface address. too weird!