API: `physicalAddress` only reports 1 IP, when there could be multiple (IPv4/IPv6)

I use the /network/{networkID}/member API to get data on my members.

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.

This also manifests on my.zerotier dashboard…

I would suggest either:

  1. Create a separate property .physicalAddressV6 to store the public V6 IP —or—
  2. Convert .physicalAddress into an array type so it can contain >1 value, e.g.
{
  .physicalAddress: [
    "100.21.3.48",
    "2600:40aa:5bc7:1751:db01:2a10:f41c:f2d0"
  ]
}

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.

{
  "physicalAddress": "2600:40aa:5bc7:1751:db01:2a10:f41c:f2d0",
  "physicalAddressV4": "100.21.3.48",
  "physicalAddressV6": "2600:40aa:5bc7:1751:db01:2a10:f41c:f2d0"
}

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.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.