HomeFreeBSD

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

Description

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

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.

Reviewed by: tuexen, glebius
Sponsored by: Klara, Inc.
Sponsored by: Modirum MDPay
Differential Revision: https://reviews.freebsd.org/D38391

Details

Provenance
markjAuthored on Feb 7 2023, 8:12 PM
Reviewer
tuexen
Differential Revision
D38391: tcp: Remove a couple of always-false checks from syncache_socket()
Parents
rG0cbcfa1964de: LinuxKPI: 802.11: deal with stopped queues
Branches
Unknown
Tags
Unknown