IPv4: Overall MTU is 65535 (0xFFFF).
If the route supports a greater MTU, we need to clamp it. The loopback reports an MTU greater by one byte (65536), and if we don't clamp it here, TCP will try to send packets actually that large (and fail.)
This commit is contained in:
@@ -1698,6 +1698,10 @@ ipv4_get_mtu(net_protocol* protocol, const struct sockaddr* address)
|
||||
mtu = route->interface_address->interface->device->mtu;
|
||||
|
||||
sDatalinkModule->put_route(sDomain, route);
|
||||
|
||||
if (mtu > 0xffff)
|
||||
mtu = 0xffff;
|
||||
|
||||
return mtu - sizeof(ipv4_header);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user