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
F167725903: D38391.id.diff
Mon, Aug 24, 1:31 AM
Unknown Object (File)
Fri, Aug 21, 7:25 PM
Unknown Object (File)
Thu, Aug 20, 1:34 PM
Unknown Object (File)
Wed, Aug 19, 2:13 AM
Unknown Object (File)
Tue, Aug 18, 9:52 AM
Unknown Object (File)
Fri, Aug 14, 11:23 PM
Unknown Object (File)
Tue, Aug 11, 11:38 PM
Unknown Object (File)
Tue, Aug 11, 11:30 PM
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