HomeFreeBSD

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

Description

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

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.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D49435
Fixes: 69c05f42871406b4b2b2dac00a268d1da0cacd3e

Details

Provenance
glebiusAuthored on Sat, Mar 22, 11:37 PM
Reviewer
markj
Differential Revision
D49435: inpcb: push multicast case local address selection logic into in_pcbladdr()
Parents
rG23db5fccb60a: hda: add macbook air 6,1 and 6,2 GPIO to enable amplifier
Branches
Unknown
Tags
Unknown