Page MenuHomeFreeBSD

tcp: improve consistency of SYN-cache handling
ClosedPublic

Authored by tuexen on Aug 22 2024, 2:07 PM.
Tags
None
Referenced Files
F100679404: D46410.id142362.diff
Fri, Oct 18, 7:08 AM
Unknown Object (File)
Sun, Oct 13, 6:07 PM
Unknown Object (File)
Sun, Oct 13, 6:06 PM
Unknown Object (File)
Sun, Oct 13, 6:06 PM
Unknown Object (File)
Sun, Oct 13, 6:04 PM
Unknown Object (File)
Wed, Oct 2, 11:39 PM
Unknown Object (File)
Wed, Oct 2, 4:04 AM
Unknown Object (File)
Wed, Oct 2, 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