Fix incorrect port range check
Motivation: In the Internet Protocol, the valid port number range is from 1 to 65535 (inclusive on the both side.) However, SocksCmdRequest refuses to construct itself when the port number 65535 is specified. Modification: Do not raise an exception when the specified port number is 65535. Result: Fixes #2428
This commit is contained in:
parent
e8b5f19b82
commit
01ef614e77
@ -63,7 +63,7 @@ public final class SocksCmdRequest extends SocksRequest {
|
||||
case UNKNOWN:
|
||||
break;
|
||||
}
|
||||
if (port < 0 && port >= 65535) {
|
||||
if (port < 0 && port >= 65536) {
|
||||
throw new IllegalArgumentException(port + " is not in bounds 0 < x < 65536");
|
||||
}
|
||||
this.cmdType = cmdType;
|
||||
|
Loading…
Reference in New Issue
Block a user