The annotated tag, v4.5 has been created
at 0fc80a1fc05dd08762fda6e8efafbb54e88608f4 (tag)
tagging b562e44f507e863c6792946e4e1b1449fbbac85d (commit)
replaces v4.5-rc7
tagged by Linus Torvalds
on Sun Mar 13 21:29:05 2016 -0700
- Shortlog ------------------------------------------------------------
Linux 4.5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAABAgAGBQJW5j4RAAoJEHm+PkMAQRiGhVEH/0qZbM1J+WnCK92bm9+inCnB
JO2JViGIuCQB5BxljVMil2dzrw85D+dC7+fryr0wVBhhBlr0lXPJGSYCYYTEaI20
Wco5YlTmjRirUwmxWzBXvB5kvTdIaNfNYDcFch6lbsaLUNgqydNKtk08ckO/4k0D
AmaShW8swBiXE/RmHuj8H41ksHsnY8W62dlczEaAIfr4kluPX/kKnyXpmpvmZm1j
sM4fskPlq+Jz5pOXXFsFfrhiBgpSUnwSj1tNwK5+DkmaVnWOkPuwkqLBWqpy4pzm
GTeDBdf5/ixGxgNsZ2VWtbPnc2wEP7SIcu45MU7QFw5kqwDN2nN63BRVXI5Z5qY=
=RFx2
-----END PGP SIGNATURE-----
-----------------------------------------------------------------------
--
linux integration
Repository : ssh://git@open-mesh.org/alfred
On branch : master
>---------------------------------------------------------------
commit 58e109973bbe8b6974a8f5d13777d949fd7054d1
Author: Dominik Heidler <dominik(a)heidler.eu>
Date: Fri Mar 11 18:02:48 2016 +0100
alfred: Allow setting the source mac via unix sock
The server will only overwrite the mac if it is zero.
Ths allows acting in place of (non-alfred) legacy clients
by injecting their data with the correct source mac.
Signed-off-by: Dominik Heidler <dominik(a)heidler.eu>
[sw(a)simonwunderlich.de: applied some style changes]
Signed-off-by: Simon Wunderlich <sw(a)simonwunderlich.de>
>---------------------------------------------------------------
58e109973bbe8b6974a8f5d13777d949fd7054d1
unix_sock.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/unix_sock.c b/unix_sock.c
index 3c7e583..a0ccc13 100644
--- a/unix_sock.c
+++ b/unix_sock.c
@@ -97,6 +97,7 @@ static int unix_sock_add_data(struct globals *globals,
struct alfred_push_data_v0 *push,
int client_sock)
{
+ static const char zero[ETH_ALEN] = { 0 };
struct alfred_data *data;
struct dataset *dataset;
int len, data_len, ret = -1;
@@ -119,7 +120,13 @@ static int unix_sock_add_data(struct globals *globals,
data = push->data;
data_len = ntohs(data->header.length);
- memcpy(data->source, &interface->hwaddr, sizeof(interface->hwaddr));
+
+ /* clients should set the source mac to 00:00:00:00:00:00
+ * to make the server set the source for them
+ */
+ if (memcmp(zero, data->source, sizeof(data->source)) == 0)
+ memcpy(data->source, &interface->hwaddr,
+ sizeof(interface->hwaddr));
if ((int)(data_len + sizeof(*data)) > len)
goto err;
Repository : ssh://git@open-mesh.org/batmand
On branch : master
>---------------------------------------------------------------
commit df6fcb8706d325b3fd4c7000493e64d57c852755
Author: Simon Wunderlich <sw(a)simonwunderlich.de>
Date: Thu Oct 10 23:59:11 2013 +0200
batmand: update email address for Simon Wunderlich
My university will stop email service for alumni in january 2014,
please use my new e-mail address instead.
Signed-off-by: Simon Wunderlich <sw(a)simonwunderlich.de>
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
>---------------------------------------------------------------
df6fcb8706d325b3fd4c7000493e64d57c852755
THANKS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/THANKS b/THANKS
index 9c10878..c102caa 100644
--- a/THANKS
+++ b/THANKS
@@ -9,7 +9,7 @@ Corinna 'Elektra' Aichele (onelektra-at-gmx.net)
Thomas Lopatic (thomas-at-lopatic.de)
Felix Fietkau (nbd-at-nbd.name)
Ludger Schmudde (lui-at-schmudde.com)
-Simon Wunderlich (siwu-at-hrz.tu-chemnitz.de)
+Simon Wunderlich (sw-at-simonwunderlich.de)
Andreas Langer (an.langer-at-gmx.de)
Sven Eckelmann (sven.eckelmann-at-gmx.de)
Antoine van Gelder (antoine-at-7degrees.co.za)
The annotated tag, v4.5-rc7 has been created
at 4dbe92d445c77fed92d4bb1b655ea52c61205b78 (tag)
tagging f6cede5b49e822ebc41a099fe41ab4989f64e2cb (commit)
replaces v4.5-rc6
tagged by Linus Torvalds
on Sun Mar 6 14:48:20 2016 -0800
- Shortlog ------------------------------------------------------------
Linux 4.5-rc7
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAABAgAGBQJW3LO0AAoJEHm+PkMAQRiGhewIAIVHA1+qSSXEHTFeuLRuYpiz
+ptQUIjPJdakWm/XqOnwSG8SWUuD4XL6ysfNmLSZIdqXYBAPpAuwT1UA2FZhz0dN
soZxMNleAvzHWRDFLqwjVdOVlTxS6CTTdEQNzi+3R0ZCADllsRcuj/GBIY+M8cr6
LvxK8BnhDU+Au3gZQjaujTMO7fKG6gOq4wKz/U7RIG37A6rwW577kEfLg4ZgFwt9
RVjsky5mrX9+4l3QFtox9ZC383P/0VZ6+vXwN2QH1/joDK4EvA8pCwsGTyjRJiqi
fArHbS+mHyAtbPWJmDbVlQ5dkZJAqRgtWBydjQYoC16S4Bwdce2/FbhBiTgEQAo=
=sqln
-----END PGP SIGNATURE-----
-----------------------------------------------------------------------
--
linux integration
The annotated tag, batman-adv-for-davem has been deleted
was 6b8d97613778c47afc26074fd857db6675e8d6f2
-----------------------------------------------------------------------
tag batman-adv-for-davem
With this patchset we finally introduce our new routing protocol:
B.A.T.M.A.N. V. Its implementation started quite some years ago,
but due to the big changes being introduced it took a while to be
discussed, designed, worked, re-worked, tested and debugged (well,
we're never done with the latest). The entire operation has
basically been a team work involving all the core contributors
together with other people interested in the project.
The new protocol is divided into two main subcomponents, called
respectively ELP and OGMv2. The former is in charge of
dealing with the neighbour discovery and link quality estimation,
while the latter implements the algorithm that spreads the
metrics around the network and computes optimal paths.
The biggest change introduced with B.A.T.M.A.N. V is the new
metric: the protocol won't rely on packet loss anymore, but it
will use the estimated throughput extracted directly from the
wifi driver (when available) by querying cfg80211.
Batman-adv will also send some unicast probing packets when
an interface is not used for payload traffic to make sure that
such values are current.
The new protocol can be compiled-in or not like other
features we have and when selected will pull in CFG80211 as
dependency for the reason described above.
Thanks to the big work brought up in the past by Marek Lindner,
batman-adv can easily deal several protocol implementations,
therefore compiling in this new version does not exclude the
older.
This means that the user is offered the option to choose
the protocol when creating the mesh interface (default is the
old one to keep backward compatibility).
Along with the protocol there are some sysfs knobs that are
introduced to fine tune some of its behaviours, but users
are recommended to keep the default values unless they know
what they are doing.
The last patch is about advertising our own patchwork platform
(thanks to Sven Eckelmann for having set that up!) in the
MAINTAINERS file.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJW1AvOAAoJENpFlCjNi1MRKxsP/1BR8Wh3MrtNhX7MMe7PnZEQ
p00kArkjtnZCbBVFbG3JduqYaOPnGyzCLgBgF3DnOxx8gAGUEu6fu4AQNNr9jiUM
4lPnPbe5NuvjzQW27fJDZMuy4Y1FLaJ5DeoYjDH48/YDNS38nzlPPtNwg0pJA2TG
C22dM6CX9kzxiy5RETmjgIjK2fgIybudWtCv7BGZxNyiqMaq+bYD+ZJJ6/wbj/FV
uKbWB28puJZ3U3qTJ6ygbhAq8moeubp/nbZeh2RGkhpmnS7LKgdLWyPxJLAEza7Z
jbdhyAE2xDYaU2xxVdOH9GecSYeUlQ+mrBdEblo2cfKMgShwZBrNjQxCaJIHN3G9
ta44yUpjGFl6/HIQnzfNZD4bTRNnb/DeRTG5qWxdrGAbxZESsMPf1Ph/hZ+KvSZ5
7eSZPmVGRYl8hJaLc25bG8pCOLQRsx/54hXNqYRqmImiPQi4IRvKUQkEDXBpHrT+
EwChfIQvCJSzZQAljrhYP/ytg/CiZxNKgW1u8cJRlHRs3jbBxJUJ67gvf2yWdQdj
Luc76uLA1++8QLqhny6AtLeRrr7mYDFnJuNjkwbqWFSyBK6r/lKS1L3ereTfeVIM
5VWMuEDlbWuPscufDJ6WDgWwTqypybjvYbnDlQV7xHap7OegyS/ukQVz2W5lXvS1
gGERfC8WeW1JnFb5TSAY
=qd6p
-----END PGP SIGNATURE-----
8b823170550e5dcc80512143088c9f9e24598f9a MAINTAINERS: Add patchwork URL for BATMAN ADVANCED
-----------------------------------------------------------------------
--
linux integration
The following commit has been merged in the merge/master branch:
commit 32bcb3f6e3cf92d9c1d19f0d254c094c119da811
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Mon Feb 22 22:56:33 2016 +0100
batman-adv: Fix unexpected free of bcast_own on add_if error
The function batadv_iv_ogm_orig_add_if allocates new buffers for bcast_own
and bcast_own_sum. It is expected that these buffers are unchanged in case
either bcast_own or bcast_own_sum couldn't be resized.
But the error handling of this function frees the already resized buffer
for bcast_own when the allocation of the new bcast_own_sum buffer failed.
This will lead to an invalid memory access when some code will try to
access bcast_own.
Instead the resized new bcast_own buffer has to be kept. This will not lead
to problems because the size of the buffer was only increased and therefore
no user of the buffer will try to access bytes outside of the new buffer.
Fixes: fdafa7d29ace ("batman-adv: provide orig_node routing API")
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
Signed-off-by: Marek Lindner <mareklindner(a)neomailbox.ch>
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index a6d389b..ea553fe 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -155,10 +155,8 @@ static int batadv_iv_ogm_orig_add_if(struct batadv_orig_node *orig_node,
orig_node->bat_iv.bcast_own = data_ptr;
data_ptr = kmalloc_array(max_if_num, sizeof(u8), GFP_ATOMIC);
- if (!data_ptr) {
- kfree(orig_node->bat_iv.bcast_own);
+ if (!data_ptr)
goto unlock;
- }
memcpy(data_ptr, orig_node->bat_iv.bcast_own_sum,
(max_if_num - 1) * sizeof(u8));
--
linux integration
The following commit has been merged in the merge/master branch:
commit 3515604d82d5b8f80201d8ff0cc4708da8cddb00
Author: Antonio Quartulli <a(a)unstable.cc>
Date: Sun Feb 28 10:44:30 2016 +0100
batman-adv: ELP - use new ethtool_link_get_ksettings API
The ethtool API is changing in linux-4.6 and the B.A.T.M.A.N. V
code has to be changed accordingly.
Fixes: 5c3245172c01 ("batman-adv: ELP - compute the metric based on the estimated throughput")
Signed-off-by: Antonio Quartulli <a(a)unstable.cc>
[sven(a)narfation.org: Added compat code for __ethtool_get_link_ksettings]
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
Signed-off-by: Marek Lindner <mareklindner(a)neomailbox.ch>
diff --git a/compat-include/linux/ethtool.h b/compat-include/linux/ethtool.h
new file mode 100644
index 0000000..87f7577
--- /dev/null
+++ b/compat-include/linux/ethtool.h
@@ -0,0 +1,62 @@
+/* Copyright (C) 2016 B.A.T.M.A.N. contributors:
+ *
+ * Antonio Quartulli
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ *
+ * This file contains macros for maintaining compatibility with older versions
+ * of the Linux kernel.
+ */
+
+#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_ETHTOOL_H_
+#define _NET_BATMAN_ADV_COMPAT_LINUX_ETHTOOL_H_
+
+#include <linux/version.h>
+#include_next <linux/ethtool.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
+
+#define ethtool_link_ksettings batadv_ethtool_link_ksettings
+
+struct batadv_ethtool_link_ksettings {
+ struct {
+ __u32 speed;
+ __u8 duplex;
+ } base;
+};
+
+#define __ethtool_get_link_ksettings(__dev, __link_settings) \
+ batadv_ethtool_get_link_ksettings(__dev, __link_settings)
+
+static inline int
+batadv_ethtool_get_link_ksettings(struct net_device *dev,
+ struct ethtool_link_ksettings *link_ksettings)
+{
+ struct ethtool_cmd cmd;
+ int ret;
+
+ memset(&cmd, 0, sizeof(cmd));
+ ret = __ethtool_get_settings(dev, &cmd);
+
+ if (ret != 0)
+ return ret;
+
+ link_ksettings->base.duplex = cmd.duplex;
+ link_ksettings->base.speed = ethtool_cmd_speed(&cmd);
+
+ return 0;
+}
+
+#endif /* < KERNEL_VERSION(4, 6, 0) */
+
+#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_ETHTOOL_H_ */
diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c
index e94b4a0..3844e7e 100644
--- a/net/batman-adv/bat_v_elp.c
+++ b/net/batman-adv/bat_v_elp.c
@@ -73,8 +73,8 @@ static void batadv_v_elp_start_timer(struct batadv_hard_iface *hard_iface)
static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh)
{
struct batadv_hard_iface *hard_iface = neigh->if_incoming;
+ struct ethtool_link_ksettings link_settings;
struct station_info sinfo;
- struct ethtool_cmd cmd;
u32 throughput;
int ret;
@@ -110,19 +110,19 @@ static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh)
/* if not a wifi interface, check if this device provides data via
* ethtool (e.g. an Ethernet adapter)
*/
- memset(&cmd, 0, sizeof(cmd));
+ memset(&link_settings, 0, sizeof(link_settings));
rtnl_lock();
- ret = __ethtool_get_settings(hard_iface->net_dev, &cmd);
+ ret = __ethtool_get_link_ksettings(hard_iface->net_dev, &link_settings);
rtnl_unlock();
if (ret == 0) {
/* link characteristics might change over time */
- if (cmd.duplex == DUPLEX_FULL)
+ if (link_settings.base.duplex == DUPLEX_FULL)
hard_iface->bat_v.flags |= BATADV_FULL_DUPLEX;
else
hard_iface->bat_v.flags &= ~BATADV_FULL_DUPLEX;
- throughput = ethtool_cmd_speed(&cmd);
- if (throughput && throughput != SPEED_UNKNOWN)
+ throughput = link_settings.base.speed;
+ if (throughput && (throughput != SPEED_UNKNOWN))
return throughput * 10;
}
--
linux integration
The following commit has been merged in the merge/master branch:
commit 789b846af6a9471982b181687a1cba8dc996b269
Author: Sven Eckelmann <sven.eckelmann(a)open-mesh.com>
Date: Tue Feb 16 10:47:07 2016 +0100
batman-adv: Fix integer overflow in batadv_iv_ogm_calc_tq
The undefined behavior sanatizer detected an signed integer overflow in a
setup with near perfect link quality
UBSAN: Undefined behaviour in net/batman-adv/bat_iv_ogm.c:1246:25
signed integer overflow:
8713350 * 255 cannot be represented in type 'int'
The problems happens because the calculation of mixed unsigned and signed
integers resulted in an integer multiplication.
batadv_ogm_packet::tq (u8 255)
* tq_own (u8 255)
* tq_asym_penalty (int 134; max 255)
* tq_iface_penalty (int 255; max 255)
The tq_iface_penalty, tq_asym_penalty and inv_asym_penalty can just be
changed to unsigned int because they are not expected to become negative.
Fixes: 46e44fdb96ef ("batman-adv: add WiFi penalty")
Signed-off-by: Sven Eckelmann <sven.eckelmann(a)open-mesh.com>
Signed-off-by: Marek Lindner <mareklindner(a)neomailbox.ch>
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index ea553fe..da0ad2b 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -1137,9 +1137,10 @@ static int batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node,
u8 total_count;
u8 orig_eq_count, neigh_rq_count, neigh_rq_inv, tq_own;
unsigned int neigh_rq_inv_cube, neigh_rq_max_cube;
- int tq_asym_penalty, inv_asym_penalty, if_num, ret = 0;
+ int if_num, ret = 0;
+ unsigned int tq_asym_penalty, inv_asym_penalty;
unsigned int combined_tq;
- int tq_iface_penalty;
+ unsigned int tq_iface_penalty;
/* find corresponding one hop neighbor */
rcu_read_lock();
--
linux integration