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
Unknown Object (File)
Thu, May 28, 1:40 AM
Unknown Object (File)
Thu, May 21, 2:47 PM
Unknown Object (File)
Thu, May 21, 7:46 AM
Unknown Object (File)
Wed, May 20, 3:54 AM
Unknown Object (File)
Tue, May 19, 6:55 PM
Unknown Object (File)
Sun, May 17, 10:34 AM
Unknown Object (File)
Wed, May 13, 9:43 PM
Unknown Object (File)
Wed, May 13, 9:42 PM
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