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)
Mon, Nov 4, 4:17 PM
Unknown Object (File)
Wed, Oct 30, 2:22 PM
Unknown Object (File)
Oct 18 2024, 7:08 AM
Unknown Object (File)
Oct 13 2024, 6:07 PM
Unknown Object (File)
Oct 13 2024, 6:06 PM
Unknown Object (File)
Oct 13 2024, 6:06 PM
Unknown Object (File)
Oct 13 2024, 6:04 PM
Unknown Object (File)
Oct 2 2024, 11:39 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