tipc: set ub->ifindex for local ipv6 address
authorXin Long <lucien.xin@gmail.com>
Mon, 3 Aug 2020 15:34:47 +0000 (23:34 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Aug 2020 19:19:52 +0000 (12:19 -0700)
commit5a6f6f579178dbeb33002d93b4f646c31348fac9
tree6ad38dd8f878d015d35e6785416c4043070a4aec
parent81f6cb31222d286dab65579d61f96664eeb99e0b
tipc: set ub->ifindex for local ipv6 address

Without ub->ifindex set for ipv6 address in tipc_udp_enable(),
ipv6_sock_mc_join() may make the wrong dev join the multicast
address in enable_mcast(). This causes that tipc links would
never be created.

So fix it by getting the right netdev and setting ub->ifindex,
as it does for ipv4 address.

Reported-by: Shuang Li <shuali@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/udp_media.c