.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * common UDP/RAW code |
---|
3 | 4 | * Linux INET implementation |
---|
4 | 5 | * |
---|
5 | 6 | * Authors: |
---|
6 | 7 | * Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or |
---|
9 | | - * modify it under the terms of the GNU General Public License |
---|
10 | | - * as published by the Free Software Foundation; either version |
---|
11 | | - * 2 of the License, or (at your option) any later version. |
---|
12 | 8 | */ |
---|
13 | 9 | |
---|
14 | 10 | #include <linux/types.h> |
---|
.. | .. |
---|
43 | 39 | oif = sk->sk_bound_dev_if; |
---|
44 | 40 | saddr = inet->inet_saddr; |
---|
45 | 41 | if (ipv4_is_multicast(usin->sin_addr.s_addr)) { |
---|
46 | | - if (!oif) |
---|
| 42 | + if (!oif || netif_index_is_l3_master(sock_net(sk), oif)) |
---|
47 | 43 | oif = inet->mc_index; |
---|
48 | 44 | if (!saddr) |
---|
49 | 45 | saddr = inet->mc_addr; |
---|
.. | .. |
---|
74 | 70 | } |
---|
75 | 71 | inet->inet_daddr = fl4->daddr; |
---|
76 | 72 | inet->inet_dport = usin->sin_port; |
---|
77 | | - reuseport_has_conns(sk, true); |
---|
| 73 | + reuseport_has_conns_set(sk); |
---|
78 | 74 | sk->sk_state = TCP_ESTABLISHED; |
---|
79 | 75 | sk_set_txhash(sk); |
---|
80 | 76 | inet->inet_id = prandom_u32(); |
---|