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 5, 7:24 PM
Unknown Object (File)
Thu, Jan 2, 10:56 PM
Unknown Object (File)
Dec 17 2024, 2:25 AM
Unknown Object (File)
Dec 5 2024, 5:21 AM
Unknown Object (File)
Nov 26 2024, 10:03 PM
Unknown Object (File)
Nov 21 2024, 1:19 AM
Unknown Object (File)
Nov 18 2024, 7:15 PM
Unknown Object (File)
Nov 4 2024, 4:17 PM

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 Skipped
Unit
Tests Skipped