[openwrt/openwrt] kernel: remove 640-bridge-only-accept-EAP-locally.patch

LEDE Commits lede-commits at lists.infradead.org
Sat Feb 12 14:58:19 PST 2022


nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/56256259a1b970db23411af73875b87850750e50

commit 56256259a1b970db23411af73875b87850750e50
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sat Feb 12 23:47:38 2022 +0100

    kernel: remove 640-bridge-only-accept-EAP-locally.patch
    
    The issue of EAP frames sent to group address (or the wrong address) has been
    addressed in mac80211, so this hack is no longer needed
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../640-bridge-only-accept-EAP-locally.patch       | 82 ----------------------
 .../640-bridge-only-accept-EAP-locally.patch       | 82 ----------------------
 2 files changed, 164 deletions(-)

diff --git a/target/linux/generic/hack-5.10/640-bridge-only-accept-EAP-locally.patch b/target/linux/generic/hack-5.10/640-bridge-only-accept-EAP-locally.patch
deleted file mode 100644
index e7052b9a8c..0000000000
--- a/target/linux/generic/hack-5.10/640-bridge-only-accept-EAP-locally.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From: Felix Fietkau <nbd at nbd.name>
-Date: Fri, 7 Jul 2017 17:18:54 +0200
-Subject: bridge: only accept EAP locally
-
-When bridging, do not forward EAP frames to other ports, only deliver
-them locally, regardless of the state.
-
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
-[add disable_eap_hack sysfs attribute]
-Signed-off-by: Etienne Champetier <champetier.etienne at gmail.com>
----
-
---- a/net/bridge/br_input.c
-+++ b/net/bridge/br_input.c
-@@ -108,10 +108,14 @@ int br_handle_frame_finish(struct net *n
- 		}
- 	}
- 
-+	BR_INPUT_SKB_CB(skb)->brdev = br->dev;
-+
-+	if (skb->protocol == htons(ETH_P_PAE) && !br->disable_eap_hack)
-+		return br_pass_frame_up(skb);
-+
- 	if (state == BR_STATE_LEARNING)
- 		goto drop;
- 
--	BR_INPUT_SKB_CB(skb)->brdev = br->dev;
- 	BR_INPUT_SKB_CB(skb)->src_port_isolated = !!(p->flags & BR_ISOLATED);
- 
- 	if (IS_ENABLED(CONFIG_INET) &&
---- a/net/bridge/br_private.h
-+++ b/net/bridge/br_private.h
-@@ -417,6 +417,8 @@ struct net_bridge {
- 	u16				group_fwd_mask;
- 	u16				group_fwd_mask_required;
- 
-+	bool				disable_eap_hack;
-+
- 	/* STP */
- 	bridge_id			designated_root;
- 	bridge_id			bridge_id;
---- a/net/bridge/br_sysfs_br.c
-+++ b/net/bridge/br_sysfs_br.c
-@@ -165,6 +165,30 @@ static ssize_t group_fwd_mask_store(stru
- }
- static DEVICE_ATTR_RW(group_fwd_mask);
- 
-+static ssize_t disable_eap_hack_show(struct device *d,
-+				   struct device_attribute *attr,
-+				   char *buf)
-+{
-+	struct net_bridge *br = to_bridge(d);
-+	return sprintf(buf, "%u\n", br->disable_eap_hack);
-+}
-+
-+static int set_disable_eap_hack(struct net_bridge *br, unsigned long val)
-+{
-+	br->disable_eap_hack = !!val;
-+
-+	return 0;
-+}
-+
-+static ssize_t disable_eap_hack_store(struct device *d,
-+				    struct device_attribute *attr,
-+				    const char *buf,
-+				    size_t len)
-+{
-+	return store_bridge_parm(d, buf, len, set_disable_eap_hack);
-+}
-+static DEVICE_ATTR_RW(disable_eap_hack);
-+
- static ssize_t priority_show(struct device *d, struct device_attribute *attr,
- 			     char *buf)
- {
-@@ -882,6 +906,7 @@ static struct attribute *bridge_attrs[]
- 	&dev_attr_ageing_time.attr,
- 	&dev_attr_stp_state.attr,
- 	&dev_attr_group_fwd_mask.attr,
-+	&dev_attr_disable_eap_hack.attr,
- 	&dev_attr_priority.attr,
- 	&dev_attr_bridge_id.attr,
- 	&dev_attr_root_id.attr,
diff --git a/target/linux/generic/hack-5.4/640-bridge-only-accept-EAP-locally.patch b/target/linux/generic/hack-5.4/640-bridge-only-accept-EAP-locally.patch
deleted file mode 100644
index a713aa3cff..0000000000
--- a/target/linux/generic/hack-5.4/640-bridge-only-accept-EAP-locally.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From: Felix Fietkau <nbd at nbd.name>
-Date: Fri, 7 Jul 2017 17:18:54 +0200
-Subject: bridge: only accept EAP locally
-
-When bridging, do not forward EAP frames to other ports, only deliver
-them locally, regardless of the state.
-
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
-[add disable_eap_hack sysfs attribute]
-Signed-off-by: Etienne Champetier <champetier.etienne at gmail.com>
----
-
---- a/net/bridge/br_input.c
-+++ b/net/bridge/br_input.c
-@@ -103,10 +103,14 @@ int br_handle_frame_finish(struct net *n
- 		}
- 	}
- 
-+	BR_INPUT_SKB_CB(skb)->brdev = br->dev;
-+
-+	if (skb->protocol == htons(ETH_P_PAE) && !br->disable_eap_hack)
-+		return br_pass_frame_up(skb);
-+
- 	if (p->state == BR_STATE_LEARNING)
- 		goto drop;
- 
--	BR_INPUT_SKB_CB(skb)->brdev = br->dev;
- 	BR_INPUT_SKB_CB(skb)->src_port_isolated = !!(p->flags & BR_ISOLATED);
- 
- 	if (IS_ENABLED(CONFIG_INET) &&
---- a/net/bridge/br_private.h
-+++ b/net/bridge/br_private.h
-@@ -345,6 +345,8 @@ struct net_bridge {
- 	u16				group_fwd_mask;
- 	u16				group_fwd_mask_required;
- 
-+	bool				disable_eap_hack;
-+
- 	/* STP */
- 	bridge_id			designated_root;
- 	bridge_id			bridge_id;
---- a/net/bridge/br_sysfs_br.c
-+++ b/net/bridge/br_sysfs_br.c
-@@ -166,6 +166,30 @@ static ssize_t group_fwd_mask_store(stru
- }
- static DEVICE_ATTR_RW(group_fwd_mask);
- 
-+static ssize_t disable_eap_hack_show(struct device *d,
-+				   struct device_attribute *attr,
-+				   char *buf)
-+{
-+	struct net_bridge *br = to_bridge(d);
-+	return sprintf(buf, "%u\n", br->disable_eap_hack);
-+}
-+
-+static int set_disable_eap_hack(struct net_bridge *br, unsigned long val)
-+{
-+	br->disable_eap_hack = !!val;
-+
-+	return 0;
-+}
-+
-+static ssize_t disable_eap_hack_store(struct device *d,
-+				    struct device_attribute *attr,
-+				    const char *buf,
-+				    size_t len)
-+{
-+	return store_bridge_parm(d, buf, len, set_disable_eap_hack);
-+}
-+static DEVICE_ATTR_RW(disable_eap_hack);
-+
- static ssize_t priority_show(struct device *d, struct device_attribute *attr,
- 			     char *buf)
- {
-@@ -851,6 +875,7 @@ static struct attribute *bridge_attrs[]
- 	&dev_attr_ageing_time.attr,
- 	&dev_attr_stp_state.attr,
- 	&dev_attr_group_fwd_mask.attr,
-+	&dev_attr_disable_eap_hack.attr,
- 	&dev_attr_priority.attr,
- 	&dev_attr_bridge_id.attr,
- 	&dev_attr_root_id.attr,



More information about the lede-commits mailing list