Page MenuHomeFreeBSD

tcp: improve consistency of SYN-cache handling
ClosedPublic

Authored by tuexen on Aug 22 2024, 2:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 10, 9:52 PM
Unknown Object (File)
Mon, Sep 29, 10:15 PM
Unknown Object (File)
Sat, Sep 13, 8:57 PM
Unknown Object (File)
Aug 16 2025, 1:10 PM
Unknown Object (File)
Aug 5 2025, 10:50 AM
Unknown Object (File)
Jul 31 2025, 2:57 PM
Unknown Object (File)
Jul 14 2025, 9:05 AM
Unknown Object (File)
Jun 27 2025, 12:19 AM

Details

Summary

Originally, a SYN-cache entry was always allocated and later freed, when not needed anymore. Then the allocation was avoided, when no SYN-cache entry was needed, and a copy on the stack was used. But the logic regarding freeing was not updated.
This patch doesn't re-check conditions (which may have changed) when deciding to insert or free the entry, but uses the result of the earlier check. This simplifies the code and improves also consistency.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable