hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/net/ipv4/datagram.c
....@@ -1,14 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * common UDP/RAW code
34 * Linux INET implementation
45 *
56 * Authors:
67 * 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.
128 */
139
1410 #include <linux/types.h>
....@@ -43,7 +39,7 @@
4339 oif = sk->sk_bound_dev_if;
4440 saddr = inet->inet_saddr;
4541 if (ipv4_is_multicast(usin->sin_addr.s_addr)) {
46
- if (!oif)
42
+ if (!oif || netif_index_is_l3_master(sock_net(sk), oif))
4743 oif = inet->mc_index;
4844 if (!saddr)
4945 saddr = inet->mc_addr;
....@@ -74,7 +70,7 @@
7470 }
7571 inet->inet_daddr = fl4->daddr;
7672 inet->inet_dport = usin->sin_port;
77
- reuseport_has_conns(sk, true);
73
+ reuseport_has_conns_set(sk);
7874 sk->sk_state = TCP_ESTABLISHED;
7975 sk_set_txhash(sk);
8076 inet->inet_id = prandom_u32();