Page MenuHomeFreeBSD

netinet6: further refactor in6_pcbconnect()
Needs ReviewPublic

Authored by glebius on Wed, Jul 1, 5:54 AM.

Details

Reviewers
pouria
Group Reviewers
network
Summary

A mistake from 90ea8e89d9b7 is that in6_pcblookup_internal() was skipped
for an inpcb that had unspecified local address. This is incorrect, as
such inpcb could have already have a port set, and in_pcb_lport_dest()
shall not be called on such inpcb. That could lead to creation of an
alised connection in the database.

This makes the function almost identical to in_pcbconnect(). While here,
fix minor bug of missing INP_ANONPORT. This flag has no use in kernel,
but affects netstat(1) output in certain mode.

Fixes: 90ea8e89d9b751e8b5ae90ef3397883b035788e5

Diff Detail

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