diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2015-03-26 09:42:59 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2015-03-26 09:42:59 +0000 |
commit | b22936646d66f2a36a70ddeb9c66a44f07b8c4ac (patch) | |
tree | 485bf7cec86903e0ab0d5cbf0daa13e36e3ab5f1 /target/linux/generic/patches-3.19/642-bridge_port_isolate.patch | |
parent | 90cd852f2508f82c8e02c5ee6b97ba7bf1823c55 (diff) | |
download | master-187ad058-b22936646d66f2a36a70ddeb9c66a44f07b8c4ac.tar.gz master-187ad058-b22936646d66f2a36a70ddeb9c66a44f07b8c4ac.tar.bz2 master-187ad058-b22936646d66f2a36a70ddeb9c66a44f07b8c4ac.zip |
drop 3.19 support
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45002 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/patches-3.19/642-bridge_port_isolate.patch')
-rw-r--r-- | target/linux/generic/patches-3.19/642-bridge_port_isolate.patch | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/target/linux/generic/patches-3.19/642-bridge_port_isolate.patch b/target/linux/generic/patches-3.19/642-bridge_port_isolate.patch deleted file mode 100644 index b1ceb31734..0000000000 --- a/target/linux/generic/patches-3.19/642-bridge_port_isolate.patch +++ /dev/null @@ -1,102 +0,0 @@ ---- a/include/linux/if_bridge.h -+++ b/include/linux/if_bridge.h -@@ -44,6 +44,7 @@ struct br_ip_list { - #define BR_PROMISC BIT(7) - #define BR_PROXYARP BIT(8) - #define BR_LEARNING_SYNC BIT(9) -+#define BR_ISOLATE_MODE BIT(10) - - extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *)); - ---- a/net/bridge/br_sysfs_if.c -+++ b/net/bridge/br_sysfs_if.c -@@ -172,6 +172,22 @@ BRPORT_ATTR_FLAG(learning, BR_LEARNING); - BRPORT_ATTR_FLAG(unicast_flood, BR_FLOOD); - BRPORT_ATTR_FLAG(proxyarp, BR_PROXYARP); - -+static ssize_t show_isolate_mode(struct net_bridge_port *p, char *buf) -+{ -+ int isolate_mode = (p->flags & BR_ISOLATE_MODE) ? 1 : 0; -+ return sprintf(buf, "%d\n", isolate_mode); -+} -+static ssize_t store_isolate_mode(struct net_bridge_port *p, unsigned long v) -+{ -+ if (v) -+ p->flags |= BR_ISOLATE_MODE; -+ else -+ p->flags &= ~BR_ISOLATE_MODE; -+ return 0; -+} -+static BRPORT_ATTR(isolate_mode, S_IRUGO | S_IWUSR, -+ show_isolate_mode, store_isolate_mode); -+ - #ifdef CONFIG_BRIDGE_IGMP_SNOOPING - static ssize_t show_multicast_router(struct net_bridge_port *p, char *buf) - { -@@ -215,6 +231,7 @@ static const struct brport_attribute *br - &brport_attr_multicast_fast_leave, - #endif - &brport_attr_proxyarp, -+ &brport_attr_isolate_mode, - NULL - }; - ---- a/net/bridge/br_input.c -+++ b/net/bridge/br_input.c -@@ -181,8 +181,8 @@ int br_handle_frame_finish(struct sk_buf - - unicast = false; - br->dev->stats.multicast++; -- } else if ((dst = __br_fdb_get(br, dest, vid)) && -- dst->is_local) { -+ } else if ((p->flags & BR_ISOLATE_MODE) || -+ ((dst = __br_fdb_get(br, dest, vid)) && dst->is_local)) { - skb2 = skb; - /* Do not forward the packet since it's local. */ - skb = NULL; ---- a/net/bridge/br_forward.c -+++ b/net/bridge/br_forward.c -@@ -117,7 +117,7 @@ EXPORT_SYMBOL_GPL(br_deliver); - /* called with rcu_read_lock */ - void br_forward(const struct net_bridge_port *to, struct sk_buff *skb, struct sk_buff *skb0) - { -- if (should_deliver(to, skb)) { -+ if (should_deliver(to, skb) && !(to->flags & BR_ISOLATE_MODE)) { - if (skb0) - deliver_clone(to, skb, __br_forward); - else -@@ -173,7 +173,7 @@ static void br_flood(struct net_bridge * - struct sk_buff *skb0, - void (*__packet_hook)(const struct net_bridge_port *p, - struct sk_buff *skb), -- bool unicast) -+ bool unicast, bool forward) - { - struct net_bridge_port *p; - struct net_bridge_port *prev; -@@ -181,6 +181,8 @@ static void br_flood(struct net_bridge * - prev = NULL; - - list_for_each_entry_rcu(p, &br->port_list, list) { -+ if (forward && (p->flags & BR_ISOLATE_MODE)) -+ continue; - /* Do not flood unicast traffic to ports that turn it off */ - if (unicast && !(p->flags & BR_FLOOD)) - continue; -@@ -212,14 +214,14 @@ out: - /* called with rcu_read_lock */ - void br_flood_deliver(struct net_bridge *br, struct sk_buff *skb, bool unicast) - { -- br_flood(br, skb, NULL, __br_deliver, unicast); -+ br_flood(br, skb, NULL, __br_deliver, unicast, false); - } - - /* called under bridge lock */ - void br_flood_forward(struct net_bridge *br, struct sk_buff *skb, - struct sk_buff *skb2, bool unicast) - { -- br_flood(br, skb, skb2, __br_forward, unicast); -+ br_flood(br, skb, skb2, __br_forward, unicast, true); - } - - #ifdef CONFIG_BRIDGE_IGMP_SNOOPING |