Page MenuHomeFreeBSD

netinet6: further refactor in6_pcbconnect()
ClosedPublic

Authored by glebius on Jul 1 2026, 5:54 AM.
Tags
None
Referenced Files
F166696786: D57987.diff
Sat, Aug 15, 4:46 PM
Unknown Object (File)
Sat, Aug 8, 3:59 PM
Unknown Object (File)
Sat, Aug 8, 3:11 PM
Unknown Object (File)
Mon, Aug 3, 4:04 AM
Unknown Object (File)
Sun, Aug 2, 7:00 AM
Unknown Object (File)
Sun, Aug 2, 5:43 AM
Unknown Object (File)
Sat, Aug 1, 7:10 PM
Unknown Object (File)
Sat, Aug 1, 4:05 AM
Subscribers

Details

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 Not Applicable
Unit
Tests Not Applicable