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)
Mon, Sep 29, 3:23 AM
Unknown Object (File)
Sat, Sep 27, 3:22 AM
Unknown Object (File)
Fri, Sep 26, 5:28 AM
Unknown Object (File)
Thu, Sep 25, 10:22 PM
Unknown Object (File)
Thu, Sep 25, 7:51 PM
Unknown Object (File)
Thu, Sep 25, 4:34 PM
Unknown Object (File)
Thu, Sep 25, 8:22 AM
Unknown Object (File)
Thu, Sep 25, 4:37 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