-
Notifications
You must be signed in to change notification settings - Fork 484
Description
The maximum UDP datagram payload over IPv4 is 65507 bytes (65507 = 65535 (max datagram size) - 20 (IP header) - 8 (UDP header)).
However, regardless of the size of the slices I give to UDP PacketBuffer, the maximum slice I can give to UDP socket send_slice() is 65493 bytes; when I give 65494 bytes, I get this error:
DEBUG /home/[...]/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/smoltcp-0.12.0/src/iface/interface/mod.rs:1221: Fragmentation buffer is too small, at least 65522 needed. Dropping
.
Although admittedly there are few, if any, use cases that need the extra 14 bytes (55507 - 65493 = 14), it would be nice to be able to fully comply with the IP/UDP "spec"/rfcs.
Same probably applies to UDP over IPv6.
Or maybe I missed a knob/config that lets me increase the size of the fragmentation buffer? I couldn't find it...