Page MenuHomeFreeBSD

inpcb: resort to wildcard hash lookup when checking for TCP port conflict
Needs ReviewPublic

Authored by glebius on Tue, Jun 30, 2:08 AM.

Details

Reviewers
markj
Group Reviewers
network
Summary

On bind(2) TCP sockets do not conflict with existing connected sockets
using the same port. We check only wildcard bound sockets. Instead of
looking through the all connections ports hash and then checking that
foreign address of an inpcb found is a wildcard, just short circuit to wild
hash lookup. Provide a better comment with a reference to the change that
introduced this logic.

Should be no behavior change.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74400
Build 71283: arc lint + arc unit