pystun
pystun copied to clipboard
[Bug] The wrong way to determine the port restricted NAT or restricted NAT
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 is right. @jtriley please fix this issue, please. Out team was misled by this result for several days.