Page MenuHomeFreeBSD

inpcb: don't return INP_DROPPED entries from pcb lookups
ClosedPublic

Authored by glebius on Oct 19 2022, 10:22 PM.
Tags
None
Referenced Files
F96306456: D37061.diff
Tue, Sep 24, 11:58 AM
Unknown Object (File)
Sun, Sep 22, 11:41 AM
Unknown Object (File)
Fri, Sep 20, 3:34 PM
Unknown Object (File)
Tue, Sep 17, 7:56 PM
Unknown Object (File)
Tue, Sep 17, 10:46 AM
Unknown Object (File)
Mon, Sep 16, 2:29 PM
Unknown Object (File)
Mon, Sep 16, 12:34 PM
Unknown Object (File)
Sat, Sep 14, 1:32 PM

Details

Summary

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.

Diff Detail

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

Event Timeline

tuexen added inline comments.
sys/netinet/tcp_lro.c
1362

Maybe also remove the comment?

sys/netinet/tcp_lro.c
1362

It still applies to the (tp == NULL) check. Which is going to be addressed later, and that would remove the comment, too.

This revision is now accepted and ready to land.Oct 20 2022, 9:27 AM