batman-adv: Import batman-adv 2016.4

Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
Sven Eckelmann 2016-10-28 15:16:57 +02:00
parent 1f927af82e
commit 2e2cd0e802
3 changed files with 42 additions and 49 deletions

View File

@ -12,7 +12,7 @@ PACKAGES_GLUON_REPO=git://github.com/freifunk-gluon/packages.git
PACKAGES_GLUON_COMMIT=738d8a236583233c0d49bbef73ac9b721534d1fc PACKAGES_GLUON_COMMIT=738d8a236583233c0d49bbef73ac9b721534d1fc
PACKAGES_ROUTING_REPO=git://github.com/openwrt-routing/packages.git PACKAGES_ROUTING_REPO=git://github.com/openwrt-routing/packages.git
PACKAGES_ROUTING_COMMIT=a4eae82c155079a4372e4b910ec733f77288b717 PACKAGES_ROUTING_COMMIT=899235a4a6370e86ad3674c38c3f95d23c8f3dc8
PACKAGES_LUCI_REPO=git://github.com/openwrt/luci.git PACKAGES_LUCI_REPO=git://github.com/openwrt/luci.git
PACKAGES_LUCI_COMMIT=70a4d43cc895b7d728b4fc201f2b6fd9f4b8aaec PACKAGES_LUCI_COMMIT=70a4d43cc895b7d728b4fc201f2b6fd9f4b8aaec

View File

@ -33,18 +33,13 @@ index 1e0c9d0..d0ab238 100644
} }
diff --git a/batman-adv/patches/1001-batman-adv-introduce-no_rebroadcast-option.patch b/batman-adv/patches/1001-batman-adv-introduce-no_rebroadcast-option.patch diff --git a/batman-adv/patches/1001-batman-adv-introduce-no_rebroadcast-option.patch b/batman-adv/patches/1001-batman-adv-introduce-no_rebroadcast-option.patch
new file mode 100644 new file mode 100644
index 0000000..e9f5ffb index 0000000..2f328d2
--- /dev/null --- /dev/null
+++ b/batman-adv/patches/1001-batman-adv-introduce-no_rebroadcast-option.patch +++ b/batman-adv/patches/1001-batman-adv-introduce-no_rebroadcast-option.patch
@@ -0,0 +1,189 @@ @@ -0,0 +1,190 @@
+From bb66988dc6972d5400b4ff4f0b49ed090007d635 Mon Sep 17 00:00:00 2001 +From: Linus Lüssing <linus.luessing@web.de>
+Message-Id: <bb66988dc6972d5400b4ff4f0b49ed090007d635.1466049319.git.mschiffer@universe-factory.net>
+From: =?UTF-8?q?Linus=20L=C3=BCssing?= <linus.luessing@web.de>
+Date: Tue, 24 Sep 2013 04:36:27 +0200 +Date: Tue, 24 Sep 2013 04:36:27 +0200
+Subject: [PATCH 1/2] batman-adv: introduce 'no_rebroadcast' option +Subject: [PATCH] batman-adv: introduce 'no_rebroadcast' option
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+ +
+This patch introduces a new sysfs option named "no_rebroadcast" on +This patch introduces a new sysfs option named "no_rebroadcast" on
+a per hard interface basis. It allows manually enabling a split-horizon +a per hard interface basis. It allows manually enabling a split-horizon
@ -68,20 +63,19 @@ index 0000000..e9f5ffb
+--- +---
+ .../ABI/testing/sysfs-class-net-batman-adv | 11 ++++ + .../ABI/testing/sysfs-class-net-batman-adv | 11 ++++
+ net/batman-adv/hard-interface.c | 2 + + net/batman-adv/hard-interface.c | 2 +
+ net/batman-adv/send.c | 4 ++ + net/batman-adv/send.c | 5 ++
+ net/batman-adv/sysfs.c | 59 ++++++++++++++++++++++ + net/batman-adv/sysfs.c | 59 ++++++++++++++++++++++
+ net/batman-adv/types.h | 1 + + net/batman-adv/types.h | 1 +
+ 5 files changed, 77 insertions(+) + 5 files changed, 78 insertions(+)
+ +
+diff --git a/Documentation/ABI/testing/sysfs-class-net-batman-adv b/Documentation/ABI/testing/sysfs-class-net-batman-adv +diff --git a/Documentation/ABI/testing/sysfs-class-net-batman-adv b/Documentation/ABI/testing/sysfs-class-net-batman-adv
+index 518f6a1..896c480 100644 +index 8981068..ac04928 100644
+--- a/Documentation/ABI/testing/sysfs-class-net-batman-adv +--- a/Documentation/ABI/testing/sysfs-class-net-batman-adv
++++ b/Documentation/ABI/testing/sysfs-class-net-batman-adv ++++ b/Documentation/ABI/testing/sysfs-class-net-batman-adv
+@@ -28,3 +28,14 @@ Description: +@@ -20,6 +20,17 @@ Description:
+ The /sys/class/net/<iface>/batman-adv/mesh_iface file
+ displays the batman mesh interface this <iface> + displays the batman mesh interface this <iface>
+ currently is associated with. + currently is associated with.
++ +
++What: /sys/class/net/<iface>/batman-adv/no_rebroadcast ++What: /sys/class/net/<iface>/batman-adv/no_rebroadcast
++Date: Sep 2013 ++Date: Sep 2013
++Contact: Linus Lüssing <linus.luessing@web.de> ++Contact: Linus Lüssing <linus.luessing@web.de>
@ -92,39 +86,49 @@ index 0000000..e9f5ffb
++ and symmetric only, for instance point-to-point wifi longshots ++ and symmetric only, for instance point-to-point wifi longshots
++ or wired links. Using this option wrongly is going to ++ or wired links. Using this option wrongly is going to
++ break your mesh network, use at your own risk! ++ break your mesh network, use at your own risk!
++
+ What: /sys/class/net/<iface>/batman-adv/throughput_override
+ Date: Feb 2014
+ Contact: Antonio Quartulli <a@unstable.cc>
+diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c +diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
+index 8c2f399..48e53d0 100644 +index e034afb..b485a88 100644
+--- a/net/batman-adv/hard-interface.c +--- a/net/batman-adv/hard-interface.c
++++ b/net/batman-adv/hard-interface.c ++++ b/net/batman-adv/hard-interface.c
+@@ -690,6 +690,8 @@ batadv_hardif_add_interface(struct net_device *net_dev) +@@ -701,6 +701,8 @@ batadv_hardif_add_interface(struct net_device *net_dev)
+ kref_init(&hard_iface->refcount); +
+ kref_get(&hard_iface->refcount); + batadv_v_hardif_init(hard_iface);
+ +
++ atomic_set(&hard_iface->no_rebroadcast, 0); ++ atomic_set(&hard_iface->no_rebroadcast, 0);
++ ++
+ batadv_check_known_mac_addr(hard_iface->net_dev); + batadv_check_known_mac_addr(hard_iface->net_dev);
+ kref_get(&hard_iface->refcount);
+ list_add_tail_rcu(&hard_iface->list, &batadv_hardif_list); + list_add_tail_rcu(&hard_iface->list, &batadv_hardif_list);
+
+diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c +diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
+index f2f1256..3736d75 100644 +index 8d4e1f5..cb1b275 100644
+--- a/net/batman-adv/send.c +--- a/net/batman-adv/send.c
++++ b/net/batman-adv/send.c ++++ b/net/batman-adv/send.c
+@@ -578,6 +578,10 @@ static void batadv_send_outstanding_bcast_packet(struct work_struct *work) +@@ -639,11 +639,16 @@ static void batadv_send_outstanding_bcast_packet(struct work_struct *work)
+ if (forw_packet->num_packets >= hard_iface->num_bcasts) + if (!kref_get_unless_zero(&hard_iface->refcount))
+ continue; + continue;
+ +
++ if (atomic_read(&hard_iface->no_rebroadcast) && ++ if (atomic_read(&hard_iface->no_rebroadcast) &&
++ forw_packet->skb->dev == hard_iface->net_dev) ++ forw_packet->skb->dev == hard_iface->net_dev)
++ continue; ++ goto put_hardif;
++ ++
+ if (!kref_get_unless_zero(&hard_iface->refcount)) + /* send a copy of the saved skb */
+ continue; + skb1 = skb_clone(forw_packet->skb, GFP_ATOMIC);
+ if (skb1)
+ batadv_send_broadcast_skb(skb1, hard_iface);
+ +
++put_hardif:
+ batadv_hardif_put(hard_iface);
+ }
+ rcu_read_unlock();
+diff --git a/net/batman-adv/sysfs.c b/net/batman-adv/sysfs.c +diff --git a/net/batman-adv/sysfs.c b/net/batman-adv/sysfs.c
+index 414b207..9aa043f 100644 +index 02d96f2..f91d09c 100644
+--- a/net/batman-adv/sysfs.c +--- a/net/batman-adv/sysfs.c
++++ b/net/batman-adv/sysfs.c ++++ b/net/batman-adv/sysfs.c
+@@ -134,6 +134,17 @@ struct batadv_attribute batadv_attr_vlan_##_name = { \ +@@ -136,6 +136,17 @@ struct batadv_attribute batadv_attr_vlan_##_name = { \
+ .store = _store, \ + .store = _store, \
+ } + }
+ +
@ -142,7 +146,7 @@ index 0000000..e9f5ffb
+ /* Use this, if you have customized show and store functions */ + /* Use this, if you have customized show and store functions */
+ #define BATADV_ATTR(_name, _mode, _show, _store) \ + #define BATADV_ATTR(_name, _mode, _show, _store) \
+ struct batadv_attribute batadv_attr_##_name = { \ + struct batadv_attribute batadv_attr_##_name = { \
+@@ -293,6 +304,52 @@ ssize_t batadv_show_##_name(struct kobject *kobj, \ +@@ -295,6 +306,52 @@ ssize_t batadv_show_##_name(struct kobject *kobj, \
+ static BATADV_ATTR(_name, _mode, batadv_show_##_name, \ + static BATADV_ATTR(_name, _mode, batadv_show_##_name, \
+ batadv_store_##_name) + batadv_store_##_name)
+ +
@ -195,7 +199,7 @@ index 0000000..e9f5ffb
+ static int batadv_store_bool_attr(char *buff, size_t count, + static int batadv_store_bool_attr(char *buff, size_t count,
+ struct net_device *net_dev, + struct net_device *net_dev,
+ const char *attr_name, atomic_t *attr, + const char *attr_name, atomic_t *attr,
+@@ -993,6 +1050,7 @@ static ssize_t batadv_show_throughput_override(struct kobject *kobj, +@@ -1119,6 +1176,7 @@ static ssize_t batadv_show_throughput_override(struct kobject *kobj,
+ static BATADV_ATTR(mesh_iface, S_IRUGO | S_IWUSR, batadv_show_mesh_iface, + static BATADV_ATTR(mesh_iface, S_IRUGO | S_IWUSR, batadv_show_mesh_iface,
+ batadv_store_mesh_iface); + batadv_store_mesh_iface);
+ static BATADV_ATTR(iface_status, S_IRUGO, batadv_show_iface_status, NULL); + static BATADV_ATTR(iface_status, S_IRUGO, batadv_show_iface_status, NULL);
@ -203,7 +207,7 @@ index 0000000..e9f5ffb
+ #ifdef CONFIG_BATMAN_ADV_BATMAN_V + #ifdef CONFIG_BATMAN_ADV_BATMAN_V
+ BATADV_ATTR_HIF_UINT(elp_interval, bat_v.elp_interval, S_IRUGO | S_IWUSR, + BATADV_ATTR_HIF_UINT(elp_interval, bat_v.elp_interval, S_IRUGO | S_IWUSR,
+ 2 * BATADV_JITTER, INT_MAX, NULL); + 2 * BATADV_JITTER, INT_MAX, NULL);
+@@ -1004,6 +1062,7 @@ static BATADV_ATTR(throughput_override, S_IRUGO | S_IWUSR, +@@ -1130,6 +1188,7 @@ static BATADV_ATTR(throughput_override, S_IRUGO | S_IWUSR,
+ static struct batadv_attribute *batadv_batman_attrs[] = { + static struct batadv_attribute *batadv_batman_attrs[] = {
+ &batadv_attr_mesh_iface, + &batadv_attr_mesh_iface,
+ &batadv_attr_iface_status, + &batadv_attr_iface_status,
@ -212,7 +216,7 @@ index 0000000..e9f5ffb
+ &batadv_attr_elp_interval, + &batadv_attr_elp_interval,
+ &batadv_attr_throughput_override, + &batadv_attr_throughput_override,
+diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h +diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
+index ba846b0..1a596c5 100644 +index b3dd1a3..9ee810d 100644
+--- a/net/batman-adv/types.h +--- a/net/batman-adv/types.h
++++ b/net/batman-adv/types.h ++++ b/net/batman-adv/types.h
+@@ -156,6 +156,7 @@ struct batadv_hard_iface { +@@ -156,6 +156,7 @@ struct batadv_hard_iface {
@ -223,6 +227,3 @@ index 0000000..e9f5ffb
+ }; + };
+ +
+ /** + /**
+--
+2.8.3
+

View File

@ -4,27 +4,22 @@ Subject: batman-adv: decrease maximum fragment size
diff --git a/batman-adv/patches/1002-batman-adv-decrease-maximum-fragment-size.patch b/batman-adv/patches/1002-batman-adv-decrease-maximum-fragment-size.patch diff --git a/batman-adv/patches/1002-batman-adv-decrease-maximum-fragment-size.patch b/batman-adv/patches/1002-batman-adv-decrease-maximum-fragment-size.patch
new file mode 100644 new file mode 100644
index 0000000..a97146b index 0000000..011380e
--- /dev/null --- /dev/null
+++ b/batman-adv/patches/1002-batman-adv-decrease-maximum-fragment-size.patch +++ b/batman-adv/patches/1002-batman-adv-decrease-maximum-fragment-size.patch
@@ -0,0 +1,28 @@ @@ -0,0 +1,20 @@
+From 9e7384fde3c5a71f733221a137fdc4593a9638be Mon Sep 17 00:00:00 2001
+Message-Id: <9e7384fde3c5a71f733221a137fdc4593a9638be.1466048916.git.mschiffer@universe-factory.net>
+In-Reply-To: <8e4c2084bbf2a65ad663a2b1ba27144e5dadfd5f.1466048916.git.mschiffer@universe-factory.net>
+References: <8e4c2084bbf2a65ad663a2b1ba27144e5dadfd5f.1466048916.git.mschiffer@universe-factory.net>
+From: Matthias Schiffer <mschiffer@universe-factory.net> +From: Matthias Schiffer <mschiffer@universe-factory.net>
+Date: Thu, 6 Aug 2015 22:27:01 +0200 +Date: Thu, 6 Aug 2015 22:27:01 +0200
+Subject: [PATCH 2/2] batman-adv: decrease maximum fragment size +Subject: [PATCH] batman-adv: decrease maximum fragment size
+
+--- +---
+ net/batman-adv/main.h | 2 +- + net/batman-adv/main.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-) + 1 file changed, 1 insertion(+), 1 deletion(-)
+ +
+diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h +diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h
+index 7692526..d314e6c 100644 +index 09af21e..23ebb8e 100644
+--- a/net/batman-adv/main.h +--- a/net/batman-adv/main.h
++++ b/net/batman-adv/main.h ++++ b/net/batman-adv/main.h
+@@ -159,7 +159,7 @@ enum batadv_uev_type { +@@ -167,7 +167,7 @@ enum batadv_uev_type {
+ /* Maximum number of fragments for one packet */ + /* Maximum number of fragments for one packet */
+ #define BATADV_FRAG_MAX_FRAGMENTS 16 + #define BATADV_FRAG_MAX_FRAGMENTS 16
+ /* Maxumim size of each fragment */ + /* Maxumim size of each fragment */
@ -33,6 +28,3 @@ index 0000000..a97146b
+ /* Time to keep fragments while waiting for rest of the fragments */ + /* Time to keep fragments while waiting for rest of the fragments */
+ #define BATADV_FRAG_TIMEOUT 10000 + #define BATADV_FRAG_TIMEOUT 10000
+ +
+--
+2.8.3
+