diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-05-25 21:29:37 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-25 22:20:37 +0200 |
commit | c6299d1e5d7bf268770cf74cd13a856b60f14de9 (patch) | |
tree | f324a918ff53ab89ecec6e673abc9851ba40b227 /Kernel/Net/TCPSocket.h | |
parent | dce97678ae407068d328a063cb356321a61cc793 (diff) | |
download | serenity-c6299d1e5d7bf268770cf74cd13a856b60f14de9.zip |
Kernel: Don't try to send TCP packets larger than the MSS
Previously TCPSocket::send_tcp_packet() would try to send TCP packets
which matched whatever size the userspace program specified. We'd try to
break those packets up into smaller fragments, however a much better
approach is to limit TCP packets to the maximum segment size and
avoid fragmentation altogether.
Diffstat (limited to 'Kernel/Net/TCPSocket.h')
-rw-r--r-- | Kernel/Net/TCPSocket.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Net/TCPSocket.h b/Kernel/Net/TCPSocket.h index f1b92e0b30..f6c5511b13 100644 --- a/Kernel/Net/TCPSocket.h +++ b/Kernel/Net/TCPSocket.h @@ -136,7 +136,7 @@ public: u32 duplicate_acks() const { return m_duplicate_acks; } KResult send_ack(bool allow_duplicate = false); - KResult send_tcp_packet(u16 flags, const UserOrKernelBuffer* = nullptr, size_t = 0); + KResult send_tcp_packet(u16 flags, const UserOrKernelBuffer* = nullptr, size_t = 0, RoutingDecision* = nullptr); void receive_tcp_packet(const TCPPacket&, u16 size); bool should_delay_next_ack() const; |