From abbdcebc543242862fad0984db2db0a842021917 Mon Sep 17 00:00:00 2001 From: Kevin Krakauer Date: Mon, 8 Mar 2021 20:37:14 -0800 Subject: Implement /proc/sys/net/ipv4/ip_local_port_range Speeds up the socket stress tests by a couple orders of magnitude. PiperOrigin-RevId: 361721050 --- pkg/tcpip/errors.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'pkg/tcpip/errors.go') 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 -- cgit v1.2.3