Fix MTU advertised by sharedmem to exclude header size.

PiperOrigin-RevId: 430986440
This commit is contained in:
Bhasker Hariharan
2022-02-25 11:11:01 -08:00
committed by gVisor bot
parent 510cc2f7fc
commit f461bb7b64
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -298,7 +298,7 @@ func (e *endpoint) IsAttached() bool {
// MTU implements stack.LinkEndpoint.MTU. It returns the value initialized
// during construction.
func (e *endpoint) MTU() uint32 {
return e.mtu - e.hdrSize
return e.mtu
}
// Capabilities implements stack.LinkEndpoint.Capabilities.
+1 -1
View File
@@ -184,7 +184,7 @@ func (e *serverEndpoint) IsAttached() bool {
// MTU implements stack.LinkEndpoint.MTU. It returns the value initialized
// during construction.
func (e *serverEndpoint) MTU() uint32 {
return e.mtu - e.hdrSize
return e.mtu
}
// Capabilities implements stack.LinkEndpoint.Capabilities.