Page MenuHomeFreeBSD

netinet6: further refactor in6_pcbconnect()
ClosedPublic

Authored by glebius on Wed, Jul 1, 5:54 AM.
Tags
None
Referenced Files
F163731792: D57987.id181455.diff
Sat, Jul 25, 5:56 PM
Unknown Object (File)
Mon, Jul 20, 6:46 PM
Unknown Object (File)
Mon, Jul 20, 12:05 AM
Unknown Object (File)
Fri, Jul 17, 4:01 AM
Unknown Object (File)
Thu, Jul 16, 12:52 PM
Unknown Object (File)
Wed, Jul 15, 8:55 PM
Unknown Object (File)
Wed, Jul 15, 7:28 AM
Unknown Object (File)
Wed, Jul 15, 7:28 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