mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:18:12 +00:00
Kernel: Set MSS option for outbound TCP SYN packets
When the MSS option header is missing the default maximum segment size is 536 which results in lots of very small TCP packets that NetworkTask has to handle. This adds the MSS option header to outbound TCP SYN packets and sets it to an appropriate value depending on the interface's MTU. Note that we do not currently do path MTU discovery so this could cause problems when hops don't fragment packets properly.
This commit is contained in:
parent
5feeb62843
commit
aff4d22de9
3 changed files with 40 additions and 16 deletions
|
@ -129,7 +129,7 @@ public:
|
|||
u32 bytes_out() const { return m_bytes_out; }
|
||||
|
||||
KResult send_tcp_packet(u16 flags, const UserOrKernelBuffer* = nullptr, size_t = 0);
|
||||
void send_outgoing_packets();
|
||||
void send_outgoing_packets(RoutingDecision&);
|
||||
void receive_tcp_packet(const TCPPacket&, u16 size);
|
||||
|
||||
static Lockable<HashMap<IPv4SocketTuple, TCPSocket*>>& sockets_by_tuple();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue