.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Linux ethernet bridge |
---|
3 | 4 | * |
---|
4 | 5 | * Authors: |
---|
5 | 6 | * 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. |
---|
11 | 7 | */ |
---|
12 | 8 | #ifndef _LINUX_IF_BRIDGE_H |
---|
13 | 9 | #define _LINUX_IF_BRIDGE_H |
---|
.. | .. |
---|
23 | 19 | #if IS_ENABLED(CONFIG_IPV6) |
---|
24 | 20 | struct in6_addr ip6; |
---|
25 | 21 | #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; |
---|
27 | 29 | __be16 proto; |
---|
28 | 30 | __u16 vid; |
---|
29 | 31 | }; |
---|
.. | .. |
---|
51 | 53 | #define BR_BCAST_FLOOD BIT(14) |
---|
52 | 54 | #define BR_NEIGH_SUPPRESS BIT(15) |
---|
53 | 55 | #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) |
---|
54 | 59 | |
---|
55 | 60 | #define BR_DEFAULT_AGEING_TIME (300 * HZ) |
---|
56 | 61 | |
---|
57 | 62 | 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; |
---|
61 | 63 | |
---|
62 | 64 | #if IS_ENABLED(CONFIG_BRIDGE) && IS_ENABLED(CONFIG_BRIDGE_IGMP_SNOOPING) |
---|
63 | 65 | int br_multicast_list_adjacent(struct net_device *dev, |
---|
.. | .. |
---|
95 | 97 | #if IS_ENABLED(CONFIG_BRIDGE) && IS_ENABLED(CONFIG_BRIDGE_VLAN_FILTERING) |
---|
96 | 98 | bool br_vlan_enabled(const struct net_device *dev); |
---|
97 | 99 | 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); |
---|
98 | 102 | int br_vlan_get_info(const struct net_device *dev, u16 vid, |
---|
99 | 103 | struct bridge_vlan_info *p_vinfo); |
---|
100 | 104 | #else |
---|
.. | .. |
---|
104 | 108 | } |
---|
105 | 109 | |
---|
106 | 110 | 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) |
---|
107 | 121 | { |
---|
108 | 122 | return -EINVAL; |
---|
109 | 123 | } |
---|
.. | .. |
---|
119 | 133 | struct net_device *br_fdb_find_port(const struct net_device *br_dev, |
---|
120 | 134 | const unsigned char *addr, |
---|
121 | 135 | __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); |
---|
122 | 138 | #else |
---|
123 | 139 | static inline struct net_device * |
---|
124 | 140 | br_fdb_find_port(const struct net_device *br_dev, |
---|
.. | .. |
---|
127 | 143 | { |
---|
128 | 144 | return NULL; |
---|
129 | 145 | } |
---|
| 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 | +} |
---|
130 | 156 | #endif |
---|
131 | 157 | |
---|
132 | 158 | #endif |
---|