Repository : ssh://git@open-mesh.org/batman-adv
On branches: ecsv/pu,ecsv/pu2,maint,master
>---------------------------------------------------------------
commit 464eff3b1768ff190466a453a57ac140ea5cb756
Author: Linus Lüssing <linus.luessing(a)c0d3.blue>
Date: Mon Feb 13 20:44:31 2017 +0100
batman-adv: Fix transmission of final, 16th fragment
Trying to split and transmit a unicast packet in 16 parts will fail for
the final fragment: After having sent the 15th one with a frag_packet.no
index of 14, we will increase the the index to 15 - and return with an
error code immediately, even though one more fragment is due for
transmission and allowed.
Fixing this issue by moving the check before incrementing the index.
While at it, adding an unlikely(), because the check is actually more of
an assertion.
Fixes: db56e4ecf5c2 ("batman-adv: Fragment and send skbs larger than mtu")
Signed-off-by: Linus Lüssing <linus.luessing(a)c0d3.blue>
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
>---------------------------------------------------------------
464eff3b1768ff190466a453a57ac140ea5cb756
net/batman-adv/fragmentation.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c
index 31e97e9..11149e5 100644
--- a/net/batman-adv/fragmentation.c
+++ b/net/batman-adv/fragmentation.c
@@ -501,6 +501,12 @@ int batadv_frag_send_packet(struct sk_buff *skb,
/* Eat and send fragments from the tail of skb */
while (skb->len > max_fragment_size) {
+ /* The initial check in this function should cover this case */
+ if (unlikely(frag_header.no == BATADV_FRAG_MAX_FRAGMENTS - 1)) {
+ ret = -EINVAL;
+ goto put_primary_if;
+ }
+
skb_fragment = batadv_frag_create(skb, &frag_header, mtu);
if (!skb_fragment) {
ret = -ENOMEM;
@@ -517,12 +523,6 @@ int batadv_frag_send_packet(struct sk_buff *skb,
}
frag_header.no++;
-
- /* The initial check in this function should cover this case */
- if (frag_header.no == BATADV_FRAG_MAX_FRAGMENTS - 1) {
- ret = -EINVAL;
- goto put_primary_if;
- }
}
/* Make room for the fragment header. */
Repository : ssh://git@open-mesh.org/batman-adv
On branches: ecsv/pu,ecsv/pu2,maint,master
>---------------------------------------------------------------
commit e3bab02816097f860545d9ce9ae0808c69d7c92f
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sun Feb 12 11:26:33 2017 +0100
batman-adv: Fix double free during fragment merge error
The function batadv_frag_skb_buffer was supposed not to consume the skbuff
on errors. This was followed in the helper function
batadv_frag_insert_packet when the skb would potentially be inserted in the
fragment queue. But it could happen that the next helper function
batadv_frag_merge_packets would try to merge the fragments and fail. This
results in a kfree_skb of all the enqueued fragments (including the just
inserted one). batadv_recv_frag_packet would detect the error in
batadv_frag_skb_buffer and try to free the skb again.
The behavior of batadv_frag_skb_buffer (and its helper
batadv_frag_insert_packet) must therefore be changed to always consume the
skbuff to have a common behavior and avoid the double kfree_skb.
Fixes: 9b3eab61754d ("batman-adv: Receive fragmented packets and merge")
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
>---------------------------------------------------------------
e3bab02816097f860545d9ce9ae0808c69d7c92f
net/batman-adv/fragmentation.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c
index 0854ebd..31e97e9 100644
--- a/net/batman-adv/fragmentation.c
+++ b/net/batman-adv/fragmentation.c
@@ -239,8 +239,10 @@ err_unlock:
spin_unlock_bh(&chain->lock);
err:
- if (!ret)
+ if (!ret) {
kfree(frag_entry_new);
+ kfree_skb(skb);
+ }
return ret;
}
@@ -313,7 +315,7 @@ free:
*
* There are three possible outcomes: 1) Packet is merged: Return true and
* set *skb to merged packet; 2) Packet is buffered: Return true and set *skb
- * to NULL; 3) Error: Return false and leave skb as is.
+ * to NULL; 3) Error: Return false and free skb.
*
* Return: true when packet is merged or buffered, false when skb is not not
* used.
@@ -338,9 +340,9 @@ bool batadv_frag_skb_buffer(struct sk_buff **skb,
goto out_err;
out:
- *skb = skb_out;
ret = true;
out_err:
+ *skb = skb_out;
return ret;
}
The annotated tag, batadv-next-for-davem-20170125 has been deleted
was c9ebbffb698d2549207a36d09841eb24ebbf4926
-----------------------------------------------------------------------
tag batadv-next-for-davem-20170125
This feature/cleanup patchset includes the following patches:
- bump version strings, by Simon Wunderlich
- Handle NET_XMIT_CN like NET_XMIT_SUCCESS, and a follow up code clean up,
by Gao Feng (2 patches)
- ignore self-generated loop detect MAC addresses in translation table,
by Simon Wunderlich
- install uapi batman_adv.h header, by Sven Eckelmann
- bump copyright years, by Sven Eckelmann
- Remove an unused variable in translation table code, by Sven Eckelmann
-----BEGIN PGP SIGNATURE-----
iQJKBAABCgA0FiEE1ilQI7G+y+fdhnrfoSvjmEKSnqEFAliI05cWHHN3QHNpbW9u
d3VuZGVybGljaC5kZQAKCRChK+OYQpKeoSBdD/wOqH7xr4o7sSb8L+7zZOuVHXF7
1zSnIPVSA6mnUrqYpeG22+J6SLFb9f7qaQNm3vLLjs3mhx9XDxbizF01bHSTbY3U
Jym/hvB1NNX13vtInbUfsnCeh6326nSK3aXKoCCMgH3PPY3GBwTzkhbRbZpV0Apw
rB8IqBwqcLapTDSbadHUB/AJaQyY30Sx3LSv6mZcJbyiRA9Mgrb3MLY9sr5RUi+u
wi+7BuJ8MicVl3m6DSNjserkJ9aKC+tsQH4GU8849zdVH3ZWBNI8j+meEXDASU/Y
TqGGMWHvtX3Jpltmkmm/65IuRS8cE6pptkjkxxwB8lgQJSfS6ZZPWRFn1EDix6Kr
vm1RIFiOjql2hCuVuwYclkesF65obzssXwW4rcdtK+KC2xPWEWxuCky4HNJFFxXM
nQX+Y6jz4fOBxrvv+NQknsUvquTB6DDLnNZl+Mr10z1h9Qhry4szDLkTpAQ+dAbT
+ON5Uvl4rdrjqUTodZKmD2cYSUrK/Ohazp8Za6BzKPnT78906WYjeqVVsRn7SiRC
bcz3XlYxDOZ84PVrqEtRUpo7J8cZIRHmbVNmo5VUUmUhycXq5x/eiGiQfyyrHUqe
sGmG2fv4JFrgqXfAh12kaQSqD1Y/yLxXtsPbmV5WXVEJ68lbq+uyTqWi30xxP9+b
Dq32C3u/94yrUQfr8Q==
=T74U
-----END PGP SIGNATURE-----
03d17903cbfdc3bdf6e08c9fb6603936135bba5b batman-adv: Remove unused variable in batadv_tt_local_set_flags
-----------------------------------------------------------------------
--
linux integration
The annotated tag, batadv-next-for-davem-20170126 has been deleted
was 3fee21c1591afdd2ae2b85c7587f697544358b3c
-----------------------------------------------------------------------
tag batadv-next-for-davem-20170126
This feature/cleanup patchset includes the following patches:
- bump version strings, by Simon Wunderlich
- ignore self-generated loop detect MAC addresses in translation table,
by Simon Wunderlich
- install uapi batman_adv.h header, by Sven Eckelmann
- bump copyright years, by Sven Eckelmann
- Remove an unused variable in translation table code, by Sven Eckelmann
- Handle NET_XMIT_CN like NET_XMIT_SUCCESS (revised according to Davids
suggestion), and a follow up code clean up, by Gao Feng (2 patches)
-----BEGIN PGP SIGNATURE-----
iQJKBAABCgA0FiEE1ilQI7G+y+fdhnrfoSvjmEKSnqEFAliKJcgWHHN3QHNpbW9u
d3VuZGVybGljaC5kZQAKCRChK+OYQpKeoYzFEACGNOZcW2bFFpuE5CZWZpTW1n24
YAY/3C+THc89oUyn7ZbWpZ05HcG+JZXOWCWHaRTnd4UeA+sbki53Ioo52ZGgo79C
7LsyXMMH3F2NrXVEfCK/MUGZcqBAxMd4dcDPsYz5q5osxydjG3hEJLikqOluop3P
JKK9FTEeP2JeoWz9eEf7Io2te6EwcIjo3TRa9f53uyyhPnk5eS2NeSle5axZqS7c
l+NSZVlrrG7oUB0UdzABt5NWOvjDc+Lqp1dkoJo17PHOgXialIfjZOKUlKtjVx6E
06ow2HZaEYCtdlb0awjyPxtIpwiy0szTzJa/h4XtzeQHgbOKIqJWAEb80X7imHVE
aljP7A1uuGm0bcVQ+pq21PX8yLu4RCDPDE5Khu9atkiQP5+sVEdGiJ8Soaw4PmoD
yhDmXshrPGR8u5txN8gaHWG4MHt19645s8dHqHQ7tf5h+mf2QXQ2v/jJQsCV2UfY
vLd/JOD4ZVYWDCspcDdEwGc8KB9r6P31wXuSVjYfkqTFXocdzDr87V7C69CS0U+b
Lzel8oa/eVa2ppR+OhpELxhL2ahO7p1jZI2ix4NHftx5MAV4WJ3RfR2ev2Sf9Ukc
aGjzjuml3JVo2i+11lqiAtOaBK9wDNv1CaC+D2NmC6wpWzWQryNryw3fm2SoH3Xm
S+UoBDZpik+SIEBv3Q==
=cd1Y
-----END PGP SIGNATURE-----
c33705188c493b7de3b8dc2956d67de91b444727 batman-adv: Treat NET_XMIT_CN as transmit successfully
-----------------------------------------------------------------------
--
linux integration
The annotated tag, batadv-next-for-davem-20170128 has been deleted
was 03316598356d25da8df0ccbc60b2690a0148b423
-----------------------------------------------------------------------
tag batadv-next-for-davem-20170128
Here are two fixes for batman-adv for net-next:
- fix double call of dev_queue_xmit(), caused by the recent introduction
of net_xmit_eval(), by Sven Eckelmann
- Fix includes for IS_ERR/ERR_PTR, by Sven Eckelmann
-----BEGIN PGP SIGNATURE-----
iQJKBAABCgA0FiEE1ilQI7G+y+fdhnrfoSvjmEKSnqEFAliMd+IWHHN3QHNpbW9u
d3VuZGVybGljaC5kZQAKCRChK+OYQpKeofArD/0RArnwnJLDZbL79oBzuYk3vFWy
/8BhZN+Bw/D6laMpE6yOM3zzDM0H9kvwgVl5ZFx5thmDgBj/cKbB2+2SjiPrQQk1
I4hDFatzo+jEtGIGDv59UsAzxbBPgFjK0ZX61tfEYIUFo3DnbJj/pcxI7+QQvkOK
vc+pyaPcYGViopyLVoy9XTt3ZhpRLdk7rlGE7vl8tydmJXrOGG+GQRbd1Emn1U63
OH/HW94hufD5dK5LsxNj1HhViEs4DPJ55+K9UeKY8caoAfn7tzXlOEdsh9uqXU1p
Zqnk2Q2n2D7/Yvs+umuj+7I1IXzykSfGAJjMv843mHuAloyyMDeDGzMxXFXnZ4Hq
DM4DgAeVcGYjYwLrPaeoLkVPMF/2e0z0S7Hfdzhp5UKk9j+846eyTsdISUEyb73h
vl+qPFc6eJ+PLTb8wMvdnuDuJWTqHDlJ2Id1GadJ86si2ZtYYrmNZp8Sn+YQg0zc
9tVI1jATxv3XU22jCnpwnrXMdDMQBX1crtY4N0MtOz3NqZdexpQR4p5LsC+PB2zJ
2JjAJExGpe4bGWorcRnHTTP5mVRdezB8vE8lKs4iIf40wdGGV3xJxq3xBBGH9S21
IpLcROfshDQfMhntpd42bw2AEDIkz4Vp/GvO8r2YUkQfKPFmX9duilQvi0VRDKNk
FfO6GqDuy6WIGcljgQ==
=iLbv
-----END PGP SIGNATURE-----
3e7514afc7d728dd47c5fe9d7a1f5216fe659cda batman-adv: Fix includes for IS_ERR/ERR_PTR
-----------------------------------------------------------------------
--
linux integration
The annotated tag, v4.10 has been created
at 850bc05248749f47b0c0a64af52cfe213bdec385 (tag)
tagging c470abd4fde40ea6a0846a2beab642a578c0b8cd (commit)
replaces v4.10-rc8
tagged by Linus Torvalds
on Sun Feb 19 14:34:08 2017 -0800
- Shortlog ------------------------------------------------------------
Linux 4.10
-----BEGIN PGP SIGNATURE-----
iQEcBAABAgAGBQJYqh1gAAoJEHm+PkMAQRiGMlYH/A1GkDfcx5wmdc6wuMit2vim
O/8aGsq2m+TyfjNmMR51nXroZaziW/zTtOyiBgaEEK9HAuEJhd1omq6TvLbeIoF2
QBQKUsu06jsxtYazm91XOCHBHy0uKunkSsv+NmAWBOGVtkja3pzn+qAFsfqNAx5Y
CTwNR1/fasA8OgXMRyhC3dcatY2iwXkVZ7BSut0Umcug3D69V8GbCDjqZg5hmlD2
v8yk7i58CtKezKK9pBHAE5qQyFTl5T77paLB49sLZ9PQU33uafSOm8spxzO4Z1Is
8QyHyUtdcJStRCPeOgOlFGjB+WpOKHXDA1LjshhC0P9U6AmU+hR0X5wSx8dp1s4=
=Tjmr
-----END PGP SIGNATURE-----
-----------------------------------------------------------------------
--
linux integration
The annotated tag, v4.10-rc8 has been created
at f1bff1ad193c13715d0f6c8f5a3451a4798c5d62 (tag)
tagging 7089db84e356562f8ba737c29e472cc42d530dbc (commit)
replaces v4.10-rc7
tagged by Linus Torvalds
on Sun Feb 12 13:03:27 2017 -0800
- Shortlog ------------------------------------------------------------
Linux 4.10-rc8
-----BEGIN PGP SIGNATURE-----
iQEcBAABAgAGBQJYoM2fAAoJEHm+PkMAQRiGr9MH/izEAMri7rJ0QMc3ejt+WmD0
8pkZw3+MVn71z6cIEgpzk4QkEWJd5rfhkETCeCp7qQ9V6cDW1FDE9+0OmPjiphDt
nnzKs7t7skEBwH5Mq5xygmIfkv+Z0QGHZ20gfQWY3F56Uxo+ARF88OBHBLKhqx3v
98C7YbMFLKBslKClA78NUEIdx0UfBaRqerlERx0Lfl9aoOrbBS6WI3iuREiylpih
9o7HTrwaGKkU4Kd6NdgJP2EyWPsd1LGalxBBjeDSpm5uokX6ALTdNXDZqcQscHjE
RmTqJTGRdhSThXOpNnvUJvk9L442yuNRrVme/IqLpxMdHPyjaXR3FGSIDb2SfjY=
=VMy8
-----END PGP SIGNATURE-----
-----------------------------------------------------------------------
--
linux integration
Repository : ssh://git@open-mesh.org/batctl
On branches: ecsv/test,master
>---------------------------------------------------------------
commit e6ae9965ccd774a4e914b8b8c9ba72df1187fbd5
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sat Feb 11 22:07:38 2017 +0100
batctl: Work around musl conflicts with linux/ethtool.h
linux/ethtool.h and musl's net/ethernet.h cannot be used at the same time.
Otherwise the compiles failes with
In file included from include/net/ethernet.h:10:0,
from functions.h:25,
from ioctl.c:36:
include/netinet/if_ether.h:101:8: error: redefinition of 'struct ethhdr'
struct ethhdr {
^
In file included from include/linux/ethtool.h:17:0,
from ioctl.c:33:
include/linux/if_ether.h:140:8: note: originally defined here
struct ethhdr {
^
Makefile:123: recipe for target 'ioctl.o' failed
Fixes: 894b25c2be5f ("batctl: Make root privileges check function specific")
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
>---------------------------------------------------------------
e6ae9965ccd774a4e914b8b8c9ba72df1187fbd5
ioctl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ioctl.c b/ioctl.c
index 832a274..5fc56b8 100644
--- a/ioctl.c
+++ b/ioctl.c
@@ -33,9 +33,10 @@
#include <linux/ethtool.h>
#include <stdint.h>
-#include "functions.h"
#include "ioctl.h"
+void check_root_or_die(const char *cmd);
+
/* code borrowed from ethtool */
static int statistics_custom_get(int fd, struct ifreq *ifr)
{
The annotated tag, v4.10-rc7 has been created
at d8c71924693d90834b2de38a061f5200b1dc6245 (tag)
tagging d5adbfcd5f7bcc6fa58a41c5c5ada0e5c826ce2c (commit)
replaces v4.10-rc6
tagged by Linus Torvalds
on Sun Feb 5 15:11:05 2017 -0800
- Shortlog ------------------------------------------------------------
Linux 4.10-rc7
-----BEGIN PGP SIGNATURE-----
iQEcBAABAgAGBQJYl7EJAAoJEHm+PkMAQRiGZ7kIAIQJNCOInU/14K5tjEz9jrKM
VPWebPm8a1E36C/Nk7mXOW1onOLSHJa7YacmmazbncmtfOANyaUqKVME88+lTWT1
Pj2ZJyeQE7XpxY0N1eXy0PWZPgPI4ENcYXXERueHTFClXdlK6550obyenw/Tqxhv
na5Yw66GSXMdNy/kTsK1pp3aJaENYWb2ueYiwr4YNQPUjhs9Y2zKAlMBwHOjuzol
aGz0482M4cKY6UmMmi8DVVEET4Sp6cQ9YCjtOP+NUOyEjAJ6XG16SejYTSQyjdK7
w0AAc9F2uCjlNPNy6QvJRO0FFiNhSdaYspPt0IgWa6bpY4m26n1DEBdqKT1uzO4=
=e20h
-----END PGP SIGNATURE-----
-----------------------------------------------------------------------
--
linux integration