Page MenuHomeFreeBSD

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

Authored by glebius on Fri, Mar 21, 1:43 PM.
Tags
None
Referenced Files
F112804203: D49435.diff
Sat, Mar 22, 11:41 PM
Unknown Object (File)
Fri, Mar 21, 1:44 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