Log the real source port of STUN mapping requests. (#206)

This commit is contained in:
Jonathan Lennox 2020-06-05 17:57:18 -04:00 committed by GitHub
parent 7016902b21
commit 8ffa9030f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,6 +79,13 @@ public class StunMappingCandidateHarvester
= new IceUdpSocketWrapper(new DatagramSocket(face)); = new IceUdpSocketWrapper(new DatagramSocket(face));
mask = sad.getMappingFor(localSocket); mask = sad.getMappingFor(localSocket);
/* Record bound address as face. */
SocketAddress boundAddr = localSocket.getLocalSocketAddress();
if (boundAddr instanceof InetSocketAddress) {
face = new TransportAddress((InetSocketAddress)boundAddr, face.getTransport());
}
if (mask != null) if (mask != null)
{ {
logger.info("Discovered public address " + mask logger.info("Discovered public address " + mask