The .physicalAddress value usually contains the public IPv4 of the node. However, sometimes (for unknown reasons) it returns the IPv6. I don’t prefer this behavior.
Hello. This shows the IP address that the network controller last communicated to the network member via. It’s not meant to be an exhaustive list of all physical IP addresses that the network member has.
Alright. But in my opinion, the current implementation is problematic.
I use the API to retreive the physicalAddress to determine a device’s location based on some known V4 networks. So the fact that this API does not return a consistent value type is causing some issues.
If the ZT client is going to fluctuate back and forth between using V4/V6 protocols, we should at least have separate data fields to store discrete values for the “last v4 contact” (.physicalAddressV4) vs “last v6 contact” (.physicalAddressV6). E.g.
I hope you will consider adding those additional 2 fields. It shouldn’t break anything since the behavior of the current unqualified .physicalAddress could remain as-is.