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
F147096357: D37061.diff
Sun, Mar 8, 7:36 AM
F147090546: D37061.id112784.diff
Sun, Mar 8, 6:21 AM
Unknown Object (File)
Fri, Mar 6, 5:38 AM
Unknown Object (File)
Fri, Mar 6, 4:59 AM
Unknown Object (File)
Wed, Mar 4, 4:50 PM
Unknown Object (File)
Sat, Feb 28, 11:19 PM
Unknown Object (File)
Wed, Feb 25, 12:00 AM
Unknown Object (File)
Tue, Feb 24, 5:06 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 47922
Build 44809: arc lint + arc unit

Event Timeline

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

Maybe also remove the comment?

sys/netinet/tcp_lro.c
1361

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