|
@@ -15,10 +15,10 @@ Signed-off-by: Felix Fietkau <[email protected]>
|
|
--- a/include/linux/if_bridge.h
|
|
--- a/include/linux/if_bridge.h
|
|
+++ b/include/linux/if_bridge.h
|
|
+++ b/include/linux/if_bridge.h
|
|
@@ -58,6 +58,7 @@ struct br_ip_list {
|
|
@@ -58,6 +58,7 @@ struct br_ip_list {
|
|
- #define BR_MRP_LOST_CONT BIT(18)
|
|
|
|
#define BR_MRP_LOST_IN_CONT BIT(19)
|
|
#define BR_MRP_LOST_IN_CONT BIT(19)
|
|
#define BR_TX_FWD_OFFLOAD BIT(20)
|
|
#define BR_TX_FWD_OFFLOAD BIT(20)
|
|
-+#define BR_BPDU_FILTER BIT(21)
|
|
|
|
|
|
+ #define BR_PORT_LOCKED BIT(21)
|
|
|
|
++#define BR_BPDU_FILTER BIT(22)
|
|
|
|
|
|
#define BR_DEFAULT_AGEING_TIME (300 * HZ)
|
|
#define BR_DEFAULT_AGEING_TIME (300 * HZ)
|
|
|
|
|
|
@@ -107,9 +107,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
|
|
--- a/include/uapi/linux/if_link.h
|
|
--- a/include/uapi/linux/if_link.h
|
|
+++ b/include/uapi/linux/if_link.h
|
|
+++ b/include/uapi/linux/if_link.h
|
|
@@ -536,6 +536,7 @@ enum {
|
|
@@ -536,6 +536,7 @@ enum {
|
|
- IFLA_BRPORT_MRP_IN_OPEN,
|
|
|
|
IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT,
|
|
IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT,
|
|
IFLA_BRPORT_MCAST_EHT_HOSTS_CNT,
|
|
IFLA_BRPORT_MCAST_EHT_HOSTS_CNT,
|
|
|
|
+ IFLA_BRPORT_LOCKED,
|
|
+ IFLA_BRPORT_BPDU_FILTER,
|
|
+ IFLA_BRPORT_BPDU_FILTER,
|
|
__IFLA_BRPORT_MAX
|
|
__IFLA_BRPORT_MAX
|
|
};
|
|
};
|
|
@@ -117,19 +117,19 @@ Signed-off-by: Felix Fietkau <[email protected]>
|
|
--- a/net/bridge/br_netlink.c
|
|
--- a/net/bridge/br_netlink.c
|
|
+++ b/net/bridge/br_netlink.c
|
|
+++ b/net/bridge/br_netlink.c
|
|
@@ -184,6 +184,7 @@ static inline size_t br_port_info_size(v
|
|
@@ -184,6 +184,7 @@ static inline size_t br_port_info_size(v
|
|
- + nla_total_size(1) /* IFLA_BRPORT_VLAN_TUNNEL */
|
|
|
|
+ nla_total_size(1) /* IFLA_BRPORT_NEIGH_SUPPRESS */
|
|
+ nla_total_size(1) /* IFLA_BRPORT_NEIGH_SUPPRESS */
|
|
+ nla_total_size(1) /* IFLA_BRPORT_ISOLATED */
|
|
+ nla_total_size(1) /* IFLA_BRPORT_ISOLATED */
|
|
|
|
+ + nla_total_size(1) /* IFLA_BRPORT_LOCKED */
|
|
+ + nla_total_size(1) /* IFLA_BRPORT_BPDU_FILTER */
|
|
+ + nla_total_size(1) /* IFLA_BRPORT_BPDU_FILTER */
|
|
+ nla_total_size(sizeof(struct ifla_bridge_id)) /* IFLA_BRPORT_ROOT_ID */
|
|
+ nla_total_size(sizeof(struct ifla_bridge_id)) /* IFLA_BRPORT_ROOT_ID */
|
|
+ nla_total_size(sizeof(struct ifla_bridge_id)) /* IFLA_BRPORT_BRIDGE_ID */
|
|
+ nla_total_size(sizeof(struct ifla_bridge_id)) /* IFLA_BRPORT_BRIDGE_ID */
|
|
+ nla_total_size(sizeof(u16)) /* IFLA_BRPORT_DESIGNATED_PORT */
|
|
+ nla_total_size(sizeof(u16)) /* IFLA_BRPORT_DESIGNATED_PORT */
|
|
@@ -269,7 +270,8 @@ static int br_port_fill_attrs(struct sk_
|
|
@@ -269,7 +270,8 @@ static int br_port_fill_attrs(struct sk_
|
|
- BR_MRP_LOST_CONT)) ||
|
|
|
|
nla_put_u8(skb, IFLA_BRPORT_MRP_IN_OPEN,
|
|
nla_put_u8(skb, IFLA_BRPORT_MRP_IN_OPEN,
|
|
!!(p->flags & BR_MRP_LOST_IN_CONT)) ||
|
|
!!(p->flags & BR_MRP_LOST_IN_CONT)) ||
|
|
-- nla_put_u8(skb, IFLA_BRPORT_ISOLATED, !!(p->flags & BR_ISOLATED)))
|
|
|
|
-+ nla_put_u8(skb, IFLA_BRPORT_ISOLATED, !!(p->flags & BR_ISOLATED)) ||
|
|
|
|
|
|
+ nla_put_u8(skb, IFLA_BRPORT_ISOLATED, !!(p->flags & BR_ISOLATED)) ||
|
|
|
|
+- nla_put_u8(skb, IFLA_BRPORT_LOCKED, !!(p->flags & BR_PORT_LOCKED)))
|
|
|
|
++ nla_put_u8(skb, IFLA_BRPORT_LOCKED, !!(p->flags & BR_PORT_LOCKED)) ||
|
|
+ nla_put_u8(skb, IFLA_BRPORT_BPDU_FILTER, !!(p->flags & BR_BPDU_FILTER)))
|
|
+ nla_put_u8(skb, IFLA_BRPORT_BPDU_FILTER, !!(p->flags & BR_BPDU_FILTER)))
|
|
return -EMSGSIZE;
|
|
return -EMSGSIZE;
|
|
|
|
|
|
@@ -143,9 +143,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
|
|
|
|
|
|
/* Change the state of the port and notify spanning tree */
|
|
/* Change the state of the port and notify spanning tree */
|
|
@@ -893,6 +896,7 @@ static int br_setport(struct net_bridge_
|
|
@@ -893,6 +896,7 @@ static int br_setport(struct net_bridge_
|
|
- br_set_port_flag(p, tb, IFLA_BRPORT_VLAN_TUNNEL, BR_VLAN_TUNNEL);
|
|
|
|
br_set_port_flag(p, tb, IFLA_BRPORT_NEIGH_SUPPRESS, BR_NEIGH_SUPPRESS);
|
|
br_set_port_flag(p, tb, IFLA_BRPORT_NEIGH_SUPPRESS, BR_NEIGH_SUPPRESS);
|
|
br_set_port_flag(p, tb, IFLA_BRPORT_ISOLATED, BR_ISOLATED);
|
|
br_set_port_flag(p, tb, IFLA_BRPORT_ISOLATED, BR_ISOLATED);
|
|
|
|
+ br_set_port_flag(p, tb, IFLA_BRPORT_LOCKED, BR_PORT_LOCKED);
|
|
+ br_set_port_flag(p, tb, IFLA_BRPORT_BPDU_FILTER, BR_BPDU_FILTER);
|
|
+ br_set_port_flag(p, tb, IFLA_BRPORT_BPDU_FILTER, BR_BPDU_FILTER);
|
|
|
|
|
|
changed_mask = old_flags ^ p->flags;
|
|
changed_mask = old_flags ^ p->flags;
|
|
@@ -153,7 +153,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
|
|
--- a/net/core/rtnetlink.c
|
|
--- a/net/core/rtnetlink.c
|
|
+++ b/net/core/rtnetlink.c
|
|
+++ b/net/core/rtnetlink.c
|
|
@@ -55,7 +55,7 @@
|
|
@@ -55,7 +55,7 @@
|
|
- #include <net/net_namespace.h>
|
|
|
|
|
|
+ #include "dev.h"
|
|
|
|
|
|
#define RTNL_MAX_TYPE 50
|
|
#define RTNL_MAX_TYPE 50
|
|
-#define RTNL_SLAVE_MAX_TYPE 40
|
|
-#define RTNL_SLAVE_MAX_TYPE 40
|