pystun icon indicating copy to clipboard operation
pystun copied to clipboard

[Bug] The wrong way to determine the port restricted NAT or restricted NAT

Open hmgle opened this issue 9 years ago • 1 comments

When we do Test3 to determine the client is behind a restricted or port restricted NAT, this line:

ret = stun_test(s, changedIP, port, source_ip, source_port, changePortRequest)

will request stun server sends a response from addr(changedIP:changedPort). As we have just send a request:

ret = stun_test(s, changedIP, changedPort, source_ip, source_port)

both RestricNAT and RestricPortNAT will receive the response. So we alway get typ = RestricNAT even if behind a port restricted NAT.

hmgle avatar Apr 29 '15 15:04 hmgle

@hmgle is right. @jtriley please fix this issue, please. Out team was misled by this result for several days.

YF-Tung avatar Nov 09 '16 07:11 YF-Tung