Hub can have any number of public and local (by local I mean IPs in RFC1918) adresses. So I don't think there's anything to be done to the ClientManager::findHub, assuming the hub doesn't let the client now about all it's IPs (which I doubt considering the state of the rest of NMDC).
Let me explain how I understood the problem.
User A connects to hub X with address 1.1.1.1,
User B connects to hub X with address 2.2.2.2.
If both are active, user A sends SR to user B with hub address 1.1.1.1. User B has no idea what this address is, as he has connected to 2.2.2.2, there's no local IP or anything that would connect this address to 1.1.1.1. So findHub returns an empty url. (With passive user receiving SR there shouldn't be any ambiguity what hub it came from. Do the passive results even include the hubIP:Port?)
Feel free to correct me if it seems I'm on crack...
Hub can have any number of public and local (by local I mean IPs in RFC1918) adresses. So I don't think there's anything to be done to the ClientManager: :findHub, assuming the hub doesn't let the client now about all it's IPs (which I doubt considering the state of the rest of NMDC).
Let me explain how I understood the problem.
User A connects to hub X with address 1.1.1.1,
User B connects to hub X with address 2.2.2.2.
If both are active, user A sends SR to user B with hub address 1.1.1.1. User B has no idea what this address is, as he has connected to 2.2.2.2, there's no local IP or anything that would connect this address to 1.1.1.1. So findHub returns an empty url. (With passive user receiving SR there shouldn't be any ambiguity what hub it came from. Do the passive results even include the hubIP:Port?)
Feel free to correct me if it seems I'm on crack...
--RZ