Page MenuHomeFreeBSD

tcp: Remove a couple of always-false checks from syncache_socket()
ClosedPublic

Authored by markj on Feb 5 2023, 9:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 9 2024, 6:20 AM
Unknown Object (File)
Dec 23 2023, 1:15 AM
Unknown Object (File)
Aug 9 2023, 4:07 AM
Unknown Object (File)
Aug 6 2023, 6:45 AM
Unknown Object (File)
Aug 6 2023, 6:42 AM
Unknown Object (File)
Aug 6 2023, 6:41 AM
Unknown Object (File)
Jun 9 2023, 11:00 PM
Unknown Object (File)
Apr 21 2023, 7:48 AM
Subscribers

Details

Summary

syncache_socket() does some unnecessary work: before connecting the PCB,
it saves the local address on the stack and restores it before freeing
the PCB in case of an error. However:

  • There's no need to restore the old address in the error case.
  • The PCB's local address will always be equal to that of the syncache entry anyway.

So just remove this unnecessary code, which appears to date from the
introduction of the syncache 20+ years ago.

No functional change intended.

Diff Detail

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