diff options
author | Kevin Krakauer <krakauer@google.com> | 2021-03-08 20:37:14 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-03-08 20:40:34 -0800 |
commit | abbdcebc543242862fad0984db2db0a842021917 (patch) | |
tree | 28e4dc26f8e7f862cc7e5a4112e1ca0b6d90c3dd /pkg/tcpip/errors.go | |
parent | 3c4485966c170850bb677efc88de4c0ecaac1358 (diff) |
Implement /proc/sys/net/ipv4/ip_local_port_range
Speeds up the socket stress tests by a couple orders of magnitude.
PiperOrigin-RevId: 361721050
Diffstat (limited to 'pkg/tcpip/errors.go')
-rw-r--r-- | pkg/tcpip/errors.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pkg/tcpip/errors.go b/pkg/tcpip/errors.go index 3b7cc52f3..5d478ac32 100644 --- a/pkg/tcpip/errors.go +++ b/pkg/tcpip/errors.go @@ -300,6 +300,19 @@ func (*ErrInvalidOptionValue) IgnoreStats() bool { } func (*ErrInvalidOptionValue) String() string { return "invalid option value specified" } +// ErrInvalidPortRange indicates an attempt to set an invalid port range. +// +// +stateify savable +type ErrInvalidPortRange struct{} + +func (*ErrInvalidPortRange) isError() {} + +// IgnoreStats implements Error. +func (*ErrInvalidPortRange) IgnoreStats() bool { + return true +} +func (*ErrInvalidPortRange) String() string { return "invalid port range" } + // ErrMalformedHeader indicates the operation encountered a malformed header. // // +stateify savable |