hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/include/net/if_inet6.h
....@@ -1,15 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * inet6 interface/address list definitions
34 * Linux INET6 implementation
45 *
56 * Authors:
67 * Pedro Roque <roque@di.fc.ul.pt>
7
- *
8
- *
9
- * This program is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU General Public License
11
- * as published by the Free Software Foundation; either version
12
- * 2 of the License, or (at your option) any later version.
138 */
149
1510 #ifndef _NET_IF_INET6_H
....@@ -69,6 +64,14 @@
6964
7065 struct hlist_node addr_lst;
7166 struct list_head if_list;
67
+ /*
68
+ * Used to safely traverse idev->addr_list in process context
69
+ * if the idev->lock needed to protect idev->addr_list cannot be held.
70
+ * In that case, add the items to this list temporarily and iterate
71
+ * without holding idev->lock.
72
+ * See addrconf_ifdown and dev_forward_change.
73
+ */
74
+ struct list_head if_list_aux;
7275
7376 struct list_head tmp_list;
7477 struct inet6_ifaddr *ifpub;
....@@ -83,7 +86,7 @@
8386 struct ip6_sf_socklist {
8487 unsigned int sl_max;
8588 unsigned int sl_count;
86
- struct in6_addr sl_addr[0];
89
+ struct in6_addr sl_addr[];
8790 };
8891
8992 #define IP6_SFLSIZE(count) (sizeof(struct ip6_sf_socklist) + \
....@@ -94,9 +97,9 @@
9497 struct ipv6_mc_socklist {
9598 struct in6_addr addr;
9699 int ifindex;
100
+ unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */
97101 struct ipv6_mc_socklist __rcu *next;
98102 rwlock_t sflock;
99
- unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */
100103 struct ip6_sf_socklist *sflist;
101104 struct rcu_head rcu;
102105 };
....@@ -146,10 +149,12 @@
146149 struct in6_addr aca_addr;
147150 struct fib6_info *aca_rt;
148151 struct ifacaddr6 *aca_next;
152
+ struct hlist_node aca_addr_lst;
149153 int aca_users;
150154 refcount_t aca_refcnt;
151155 unsigned long aca_cstamp;
152156 unsigned long aca_tstamp;
157
+ struct rcu_head rcu;
153158 };
154159
155160 #define IFA_HOST IPV6_ADDR_LOOPBACK
....@@ -193,7 +198,6 @@
193198 int dead;
194199
195200 u32 desync_factor;
196
- u8 rndid[8];
197201 struct list_head tempaddr_list;
198202
199203 struct in6_addr token;