mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Implement /proc/sys/net/ipv4/ip_local_port_range
Speeds up the socket stress tests by a couple orders of magnitude. PiperOrigin-RevId: 361721050
This commit is contained in:
committed by
gVisor bot
parent
3c4485966c
commit
abbdcebc54
@@ -478,3 +478,13 @@ func (s *Stack) SetForwarding(protocol tcpip.NetworkProtocolNumber, enable bool)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// PortRange implements inet.Stack.PortRange.
|
||||
func (s *Stack) PortRange() (uint16, uint16) {
|
||||
return s.Stack.PortRange()
|
||||
}
|
||||
|
||||
// SetPortRange implements inet.Stack.SetPortRange.
|
||||
func (s *Stack) SetPortRange(start uint16, end uint16) error {
|
||||
return syserr.TranslateNetstackError(s.Stack.SetPortRange(start, end)).ToError()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user