modules: update routing packages

3aaa772ef520 bmx7: bump version
ccd4210f0ba7 bmx7: add PKG_MIRROR_HASH
d6dcd0c75630 bmx6: add PKG_MIRROR_HASH
536782119f0a alfred: upgrade package to latest release 2018.0
6a6f5da5efd5 batctl: upgrade package to latest release 2018.0
3bb75b003563 batman-adv: upgrade package to latest release 2018.0
2f74073c209d bmx7: bump version to 58b3823262512a48f5174e6778b2368c55bd05d9
733e935f04fc cjdns: v20 -> v20.1
f0ee73aa2285 bmx7: bump version
21a6454d7226 bmx6: bump to latest upstream version
This commit is contained in:
Matthias Schiffer 2018-03-07 08:37:45 +01:00
parent 17370d8462
commit 4d9c3c1c79
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
5 changed files with 102 additions and 152 deletions

View File

@ -12,7 +12,7 @@ PACKAGES_GLUON_REPO=https://github.com/freifunk-gluon/packages.git
PACKAGES_GLUON_COMMIT=5c6476ea5893b187aa7aba1063323f38712f3455
PACKAGES_ROUTING_REPO=https://github.com/openwrt-routing/packages.git
PACKAGES_ROUTING_COMMIT=c5f18d5a2a83cb1109aa68ce52dfb05f4c307a4f
PACKAGES_ROUTING_COMMIT=3aaa772ef520e5e02ddd6a3eecf67a81fad726f5
PACKAGES_LUCI_REPO=https://github.com/openwrt/luci.git
PACKAGES_LUCI_BRANCH=lede-17.01

View File

@ -4,13 +4,13 @@ Subject: alfred: adjust intervals
diff --git a/alfred/patches/0001-alfred-adjust-intervals.patch b/alfred/patches/0001-alfred-adjust-intervals.patch
new file mode 100644
index 0000000000000000000000000000000000000000..a5860db77332e4262b42e632e50f7f739b23cbfd
index 0000000000000000000000000000000000000000..a6d1e40ac28fcf803b9129128be744b284529762
--- /dev/null
+++ b/alfred/patches/0001-alfred-adjust-intervals.patch
@@ -0,0 +1,15 @@
+--- a/alfred.h
++++ b/alfred.h
+@@ -34,10 +34,10 @@
+@@ -36,10 +36,10 @@
+ #include "list.h"
+ #include "packet.h"
+

View File

@ -1,102 +0,0 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Mon, 22 Jan 2018 20:41:41 +0100
Subject: batman-adv: add fixes for packet checksum handling
diff --git a/batman-adv/patches/0001-batman-adv-fix-packet-checksum-in-receive-path.patch b/batman-adv/patches/0001-batman-adv-fix-packet-checksum-in-receive-path.patch
new file mode 100644
index 0000000000000000000000000000000000000000..ce1a5345be1405ccf034ab948b2061be46cda090
--- /dev/null
+++ b/batman-adv/patches/0001-batman-adv-fix-packet-checksum-in-receive-path.patch
@@ -0,0 +1,44 @@
+From 05cee97344804ffb2a8df87603663a098fd0cb36 Mon Sep 17 00:00:00 2001
+Message-Id: <05cee97344804ffb2a8df87603663a098fd0cb36.1516705934.git.mschiffer@universe-factory.net>
+From: Matthias Schiffer <mschiffer@universe-factory.net>
+Date: Mon, 22 Jan 2018 20:06:51 +0100
+Subject: [PATCH 1/2] batman-adv: fix packet checksum in receive path
+
+eth_type_trans() internally calls skb_pull(), which does not adjust the
+skb checksum; skb_postpull_rcsum() is necessary to avoid log spam of the
+form "bat0: hw csum failure" when packets with CHECKSUM_COMPLETE are
+received.
+
+Note that in usual setups, packets don't reach batman-adv with
+CHECKSUM_COMPLETE (I assume NICs bail out of checksumming when they see
+batadv's ethtype?), which is why the log messages do nor occur on every
+system using batman-adv. I could reproduce this issue by stacking
+batman-adv on top of a VXLAN interface.
+
+Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
+---
+ net/batman-adv/soft-interface.c | 8 +-------
+ 1 file changed, 1 insertion(+), 7 deletions(-)
+
+diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
+index 9f673cdf..6f7ce7a6 100644
+--- a/net/batman-adv/soft-interface.c
++++ b/net/batman-adv/soft-interface.c
+@@ -451,13 +451,7 @@ void batadv_interface_rx(struct net_device *soft_iface,
+
+ /* skb->dev & skb->pkt_type are set here */
+ skb->protocol = eth_type_trans(skb, soft_iface);
+-
+- /* should not be necessary anymore as we use skb_pull_rcsum()
+- * TODO: please verify this and remove this TODO
+- * -- Dec 21st 2009, Simon Wunderlich
+- */
+-
+- /* skb->ip_summed = CHECKSUM_UNNECESSARY; */
++ skb_postpull_rcsum(skb, eth_hdr(skb), ETH_HLEN);
+
+ batadv_inc_counter(bat_priv, BATADV_CNT_RX);
+ batadv_add_counter(bat_priv, BATADV_CNT_RX_BYTES,
+--
+2.16.1
+
diff --git a/batman-adv/patches/0002-batman-adv-invalidate-checksum-on-fragment-reassembl.patch b/batman-adv/patches/0002-batman-adv-invalidate-checksum-on-fragment-reassembl.patch
new file mode 100644
index 0000000000000000000000000000000000000000..957fc345846acde05345963bcd66eed47b167358
--- /dev/null
+++ b/batman-adv/patches/0002-batman-adv-invalidate-checksum-on-fragment-reassembl.patch
@@ -0,0 +1,42 @@
+From 3f5713999a5f61ed7221944276393b4ff40a9416 Mon Sep 17 00:00:00 2001
+Message-Id: <3f5713999a5f61ed7221944276393b4ff40a9416.1516705934.git.mschiffer@universe-factory.net>
+In-Reply-To: <05cee97344804ffb2a8df87603663a098fd0cb36.1516705934.git.mschiffer@universe-factory.net>
+References: <05cee97344804ffb2a8df87603663a098fd0cb36.1516705934.git.mschiffer@universe-factory.net>
+From: Matthias Schiffer <mschiffer@universe-factory.net>
+Date: Tue, 23 Jan 2018 10:24:45 +0100
+Subject: [PATCH 2/2] batman-adv: invalidate checksum on fragment reassembly
+
+A more sophisticated implementation could try to combine fragment checksums
+when all fragments have CHECKSUM_COMPLETE and are split at even offsets.
+For now, we just set ip_summed to CHECKSUM_NONE to avoid "hw csum failure"
+warnings in the kernel log when fragmented frames are received. In
+consequence, skb_pull_rcsum() can be replaced with skb_pull().
+
+Note that in usual setups, packets don't reach batman-adv with
+CHECKSUM_COMPLETE (I assume NICs bail out of checksumming when they see
+batadv's ethtype?), which is why the log messages do nor occur on every
+system using batman-adv. I could reproduce this issue by stacking
+batman-adv on top of a VXLAN interface.
+
+Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
+---
+ net/batman-adv/fragmentation.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c
+index ebe6e389..1bb2b43f 100644
+--- a/net/batman-adv/fragmentation.c
++++ b/net/batman-adv/fragmentation.c
+@@ -287,7 +287,8 @@ batadv_frag_merge_packets(struct hlist_head *chain)
+ /* Move the existing MAC header to just before the payload. (Override
+ * the fragment header.)
+ */
+- skb_pull_rcsum(skb_out, hdr_size);
++ skb_pull(skb_out, hdr_size);
++ skb_out->ip_summed = CHECKSUM_NONE;
+ memmove(skb_out->data - ETH_HLEN, skb_mac_header(skb_out), ETH_HLEN);
+ skb_set_mac_header(skb_out, -ETH_HLEN);
+ skb_reset_network_header(skb_out);
+--
+2.16.1
+

View File

@ -0,0 +1,99 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Tue, 23 Jan 2018 21:18:34 +0100
Subject: batman-adv: unaligned access fix
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/batman-adv/patches/900-unaligned-access.patch b/batman-adv/patches/900-unaligned-access.patch
new file mode 100644
index 0000000000000000000000000000000000000000..eb067329bc5e9f112b56d03c20c612fb1fd1e32d
--- /dev/null
+++ b/batman-adv/patches/900-unaligned-access.patch
@@ -0,0 +1,87 @@
+From: Matthias Schiffer <mschiffer@universe-factory.net>
+Date: Wed, 24 Jan 2018 11:21:37 +0000 (+0100)
+Subject: batman-adv: always assume 2-byte packet alignment
+X-Git-Url: https://git.open-mesh.org/batman-adv.git/commitdiff_plain/0509fc0c128ba2891770305c57c9b6a3a61ea7bd
+
+batman-adv: always assume 2-byte packet alignment
+
+NIC drivers generally try to ensure that the "network header" is aligned
+to a 4-byte boundary. This is not always possible: When Ethernet frames are
+encapsulated in other packets with 4-byte aligned headers, the inner
+Ethernet header will have 4-byte alignment, and in consequence, the inner
+network header is aligned to 2, but not to 4 bytes.
+
+Most parts of batman-adv only care about 2-byte alignment; in particular,
+no unaligned accesses occur in performance-critical paths that handle
+actual payload data. This is not true for OGM handling: the seqno and crc
+fields are accessed as 32-bit values. To avoid these unaligned accesses,
+this patch reduces the expected packet alignment to 2 bytes for all of
+batadv's packet types.
+
+As no unaligned accesses existed on the performance-critical paths anyways,
+this chance does have any (positive or negative) effect on performance, but
+it still makes sense to avoid these accesses to prevent log noise when
+examining other unaligned accesses in the kernel while batman-adv is
+active.
+
+Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
+Signed-off-by: Sven Eckelmann <sven@narfation.org>
+---
+
+diff --git a/include/uapi/linux/batadv_packet.h b/include/uapi/linux/batadv_packet.h
+index daefd72..894d8d2 100644
+--- a/include/uapi/linux/batadv_packet.h
++++ b/include/uapi/linux/batadv_packet.h
+@@ -196,8 +196,6 @@ struct batadv_bla_claim_dst {
+ __be16 group; /* group id */
+ };
+
+-#pragma pack()
+-
+ /**
+ * struct batadv_ogm_packet - ogm (routing protocol) packet
+ * @packet_type: batman-adv packet type, part of the general header
+@@ -222,9 +220,6 @@ struct batadv_ogm_packet {
+ __u8 reserved;
+ __u8 tq;
+ __be16 tvlv_len;
+- /* __packed is not needed as the struct size is divisible by 4,
+- * and the largest data type in this struct has a size of 4.
+- */
+ };
+
+ #define BATADV_OGM_HLEN sizeof(struct batadv_ogm_packet)
+@@ -249,9 +244,6 @@ struct batadv_ogm2_packet {
+ __u8 orig[ETH_ALEN];
+ __be16 tvlv_len;
+ __be32 throughput;
+- /* __packed is not needed as the struct size is divisible by 4,
+- * and the largest data type in this struct has a size of 4.
+- */
+ };
+
+ #define BATADV_OGM2_HLEN sizeof(struct batadv_ogm2_packet)
+@@ -405,7 +397,6 @@ struct batadv_icmp_packet_rr {
+ * misalignment of the payload after the ethernet header. It may also lead to
+ * leakage of information when the padding it not initialized before sending.
+ */
+-#pragma pack(2)
+
+ /**
+ * struct batadv_unicast_packet - unicast packet for network payload
+@@ -533,8 +524,6 @@ struct batadv_coded_packet {
+ __be16 coded_len;
+ };
+
+-#pragma pack()
+-
+ /**
+ * struct batadv_unicast_tvlv_packet - generic unicast packet with tvlv payload
+ * @packet_type: batman-adv packet type, part of the general header
+@@ -641,4 +630,6 @@ struct batadv_tvlv_mcast_data {
+ __u8 reserved[3];
+ };
+
++#pragma pack()
++
+ #endif /* _UAPI_LINUX_BATADV_PACKET_H_ */

View File

@ -1,47 +0,0 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Tue, 23 Jan 2018 21:18:34 +0100
Subject: batman-adv: unaligned access fixes
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/batman-adv/patches/900-unaligned-access.patch b/batman-adv/patches/900-unaligned-access.patch
new file mode 100644
index 0000000000000000000000000000000000000000..ba428b683ab146773162b0956a7e3b6260c14339
--- /dev/null
+++ b/batman-adv/patches/900-unaligned-access.patch
@@ -0,0 +1,35 @@
+--- a/net/batman-adv/packet.h
++++ b/net/batman-adv/packet.h
+@@ -173,8 +173,6 @@ struct batadv_bla_claim_dst {
+ __be16 group; /* group id */
+ };
+
+-#pragma pack()
+-
+ /**
+ * struct batadv_ogm_packet - ogm (routing protocol) packet
+ * @packet_type: batman-adv packet type, part of the general header
+@@ -382,7 +380,6 @@ struct batadv_icmp_packet_rr {
+ * misalignment of the payload after the ethernet header. It may also lead to
+ * leakage of information when the padding it not initialized before sending.
+ */
+-#pragma pack(2)
+
+ /**
+ * struct batadv_unicast_packet - unicast packet for network payload
+@@ -510,8 +507,6 @@ struct batadv_coded_packet {
+ __be16 coded_len;
+ };
+
+-#pragma pack()
+-
+ /**
+ * struct batadv_unicast_tvlv_packet - generic unicast packet with tvlv payload
+ * @packet_type: batman-adv packet type, part of the general header
+@@ -618,4 +613,6 @@ struct batadv_tvlv_mcast_data {
+ u8 reserved[3];
+ };
+
++#pragma pack()
++
+ #endif /* _NET_BATMAN_ADV_PACKET_H_ */