hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/linux/if_bridge.h
....@@ -1,13 +1,9 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Linux ethernet bridge
34 *
45 * Authors:
56 * Lennert Buytenhek <buytenh@gnu.org>
6
- *
7
- * This program is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU General Public License
9
- * as published by the Free Software Foundation; either version
10
- * 2 of the License, or (at your option) any later version.
117 */
128 #ifndef _LINUX_IF_BRIDGE_H
139 #define _LINUX_IF_BRIDGE_H
....@@ -23,7 +19,13 @@
2319 #if IS_ENABLED(CONFIG_IPV6)
2420 struct in6_addr ip6;
2521 #endif
26
- } u;
22
+ } src;
23
+ union {
24
+ __be32 ip4;
25
+#if IS_ENABLED(CONFIG_IPV6)
26
+ struct in6_addr ip6;
27
+#endif
28
+ } dst;
2729 __be16 proto;
2830 __u16 vid;
2931 };
....@@ -51,13 +53,13 @@
5153 #define BR_BCAST_FLOOD BIT(14)
5254 #define BR_NEIGH_SUPPRESS BIT(15)
5355 #define BR_ISOLATED BIT(16)
56
+#define BR_MRP_AWARE BIT(17)
57
+#define BR_MRP_LOST_CONT BIT(18)
58
+#define BR_MRP_LOST_IN_CONT BIT(19)
5459
5560 #define BR_DEFAULT_AGEING_TIME (300 * HZ)
5661
5762 extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *));
58
-
59
-typedef int br_should_route_hook_t(struct sk_buff *skb);
60
-extern br_should_route_hook_t __rcu *br_should_route_hook;
6163
6264 #if IS_ENABLED(CONFIG_BRIDGE) && IS_ENABLED(CONFIG_BRIDGE_IGMP_SNOOPING)
6365 int br_multicast_list_adjacent(struct net_device *dev,
....@@ -95,6 +97,8 @@
9597 #if IS_ENABLED(CONFIG_BRIDGE) && IS_ENABLED(CONFIG_BRIDGE_VLAN_FILTERING)
9698 bool br_vlan_enabled(const struct net_device *dev);
9799 int br_vlan_get_pvid(const struct net_device *dev, u16 *p_pvid);
100
+int br_vlan_get_pvid_rcu(const struct net_device *dev, u16 *p_pvid);
101
+int br_vlan_get_proto(const struct net_device *dev, u16 *p_proto);
98102 int br_vlan_get_info(const struct net_device *dev, u16 vid,
99103 struct bridge_vlan_info *p_vinfo);
100104 #else
....@@ -104,6 +108,16 @@
104108 }
105109
106110 static inline int br_vlan_get_pvid(const struct net_device *dev, u16 *p_pvid)
111
+{
112
+ return -EINVAL;
113
+}
114
+
115
+static inline int br_vlan_get_proto(const struct net_device *dev, u16 *p_proto)
116
+{
117
+ return -EINVAL;
118
+}
119
+
120
+static inline int br_vlan_get_pvid_rcu(const struct net_device *dev, u16 *p_pvid)
107121 {
108122 return -EINVAL;
109123 }
....@@ -119,6 +133,8 @@
119133 struct net_device *br_fdb_find_port(const struct net_device *br_dev,
120134 const unsigned char *addr,
121135 __u16 vid);
136
+void br_fdb_clear_offload(const struct net_device *dev, u16 vid);
137
+bool br_port_flag_is_set(const struct net_device *dev, unsigned long flag);
122138 #else
123139 static inline struct net_device *
124140 br_fdb_find_port(const struct net_device *br_dev,
....@@ -127,6 +143,16 @@
127143 {
128144 return NULL;
129145 }
146
+
147
+static inline void br_fdb_clear_offload(const struct net_device *dev, u16 vid)
148
+{
149
+}
150
+
151
+static inline bool
152
+br_port_flag_is_set(const struct net_device *dev, unsigned long flag)
153
+{
154
+ return false;
155
+}
130156 #endif
131157
132158 #endif