Page MenuHomeFreeBSD

inpcb: push multicast case local address selection logic into in_pcbladdr()
ClosedPublic

Authored by glebius on Mar 21 2025, 1:43 PM.
Tags
None
Referenced Files
F138009379: D49435.id152493.diff
Fri, Nov 28, 2:52 AM
Unknown Object (File)
Fri, Nov 21, 12:09 AM
Unknown Object (File)
Mon, Nov 10, 4:51 AM
Unknown Object (File)
Oct 23 2025, 12:39 AM
Unknown Object (File)
Oct 19 2025, 7:18 AM
Unknown Object (File)
Sep 29 2025, 3:23 AM
Unknown Object (File)
Sep 27 2025, 3:22 AM
Unknown Object (File)
Sep 26 2025, 5:28 AM
Subscribers

Details

Summary

When destination is multicast and inpcb has multicast options configured,
we use completely different logic than in a normal case. Before this
change, in in_pcbconnect() we would run in_pcbladdr() and then just ignore
its results and run the multicast case block, that would override any
earlier selection or failure. Let's embed the case in in_pcbladdr() and
also check it earlier.

Also, 69c05f428714 switched UDP unconnected sendto(2) to use in_pcbladdr()
instead of in_pcbconnect_setup() and due to that lost the multicast case.

Fixes: 69c05f42871406b4b2b2dac00a268d1da0cacd3e

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable