mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +00:00
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.
This commit is contained in:
parent
dce97678ae
commit
c6299d1e5d
2 changed files with 10 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue