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)
Sun, Jan 25, 2:14 AM
Unknown Object (File)
Fri, Jan 23, 5:36 AM
Unknown Object (File)
Sun, Jan 11, 2:14 PM
Unknown Object (File)
Sun, Jan 11, 2:14 PM
Unknown Object (File)
Dec 22 2025, 10:18 AM
Unknown Object (File)
Dec 18 2025, 11:30 AM
Unknown Object (File)
Dec 14 2025, 4:31 AM
Unknown Object (File)
Dec 8 2025, 12:50 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