HomeFreeBSD

inpcb: don't return INP_DROPPED entries from pcb lookups

Description

inpcb: don't return INP_DROPPED entries from pcb lookups

The in_pcbdrop() KPI, which is used solely by TCP, allows to remove a
pcb from hash list and mark it as dropped. The comment suggests that
such pcb won't be returned by lookups. Indeed, every call to
in_pcblookup*() is accompanied by a check for INP_DROPPED. Do what
comment suggests: never return such pcbs and remove unnecessary checks.

Reviewed by: tuexen
Differential revision: https://reviews.freebsd.org/D37061

Details

Provenance
glebiusAuthored on Nov 8 2022, 6:24 PM
Reviewer
tuexen
Differential Revision
D37061: inpcb: don't return INP_DROPPED entries from pcb lookups
Parents
rGb5c3819c7b57: LinuxKPI: add virt_to_phys()
Branches
Unknown
Tags
Unknown