batman-adv: 2013.3.0 updated stability fixes
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
This commit is contained in:
parent
a8e21bf882
commit
fd336abf54
5 changed files with 150 additions and 9 deletions
|
@ -12,7 +12,7 @@ PKG_NAME:=batman-adv
|
|||
|
||||
PKG_VERSION:=2013.3.0
|
||||
BATCTL_VERSION:=2013.3.0
|
||||
PKG_RELEASE:=5
|
||||
PKG_RELEASE:=6
|
||||
PKG_MD5SUM:=d070c0879cd8fe8125315a4566fabd2d
|
||||
BATCTL_MD5SUM:=747535b0296f0013a6f99373a51d41fc
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
From c98c3e521913b8dd5fee4d3b90dc9ed7a47e5bee Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Linus=20L=C3=BCssing?= <linus.luessing@web.de>
|
||||
Date: Tue, 6 Aug 2013 20:21:15 +0200
|
||||
Subject: [PATCH] batman-adv: fix potential kernel paging errors for unicast
|
||||
transmissions
|
||||
Subject: [PATCH 1/4] batman-adv: fix potential kernel paging errors for
|
||||
unicast transmissions
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
@ -199,5 +199,5 @@ index dc8b5d4..688a041 100644
|
|||
|
||||
/* inform the destination node that we are still missing a correct route
|
||||
--
|
||||
1.7.10.4
|
||||
1.8.4.rc3
|
||||
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
From 0d941e82ab5f92faf33bee6abdde519056f3ac2d Mon Sep 17 00:00:00 2001
|
||||
From: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
|
||||
Date: Wed, 26 Jun 2013 11:37:51 +0200
|
||||
Subject: [PATCH 2/4] batman-adv: Unmap fragment page once iterator is done
|
||||
|
||||
Callers of skb_seq_read() are currently forced to call skb_abort_seq_read()
|
||||
even when consuming all the data because the last call to skb_seq_read (the
|
||||
one that returns 0 to indicate the end) fails to unmap the last fragment page.
|
||||
|
||||
With this patch callers will be allowed to traverse the SKB data by calling
|
||||
skb_prepare_seq_read() once and repeatedly calling skb_seq_read() as originally
|
||||
intended (and documented in the original commit 677e90eda), that is, only call
|
||||
skb_abort_seq_read() if the sequential read is actually aborted.
|
||||
|
||||
Signed-off-by: Wedson Almeida Filho <wedsonaf@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
|
||||
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
|
||||
---
|
||||
compat.h | 8 ++++++++
|
||||
main.c | 1 -
|
||||
2 files changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/compat.h b/compat.h
|
||||
index 17ef089..346a824 100644
|
||||
--- a/compat.h
|
||||
+++ b/compat.h
|
||||
@@ -306,6 +306,14 @@ static int __batadv_interface_set_mac_addr(x, y)
|
||||
|
||||
#define netdev_notifier_info_to_dev(ptr) ptr
|
||||
|
||||
+/* older kernels still need to call skb_abort_seq_read() */
|
||||
+#define skb_seq_read(consumed, data, st) \
|
||||
+ ({ \
|
||||
+ int len = skb_seq_read(consumed, data, st); \
|
||||
+ if (len == 0) \
|
||||
+ skb_abort_seq_read(st); \
|
||||
+ len; \
|
||||
+ })
|
||||
#endif /* < KERNEL_VERSION(3, 11, 0) */
|
||||
|
||||
#endif /* _NET_BATMAN_ADV_COMPAT_H_ */
|
||||
diff --git a/main.c b/main.c
|
||||
index 51aafd6..08125f3 100644
|
||||
--- a/main.c
|
||||
+++ b/main.c
|
||||
@@ -473,7 +473,6 @@ __be32 batadv_skb_crc32(struct sk_buff *skb, u8 *payload_ptr)
|
||||
crc = crc32c(crc, data, len);
|
||||
consumed += len;
|
||||
}
|
||||
- skb_abort_seq_read(&st);
|
||||
|
||||
return htonl(crc);
|
||||
}
|
||||
--
|
||||
1.8.4.rc3
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
From e39bc52671fb33e7d79e58cd5838be75e12abeb8 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Quartulli <ordex@autistici.org>
|
||||
Date: Sun, 18 Aug 2013 12:40:03 +0200
|
||||
Subject: [PATCH 3/4] batman-adv: fix variable name in compat code
|
||||
|
||||
compat code introduced by
|
||||
0d941e82ab5f92faf33bee6abdde519056f3ac2d
|
||||
("batman-adv: Unmap fragment page once iterator is done")
|
||||
is declaring a variable having the same name of one used in
|
||||
the batman-adv code. Rename it to prevent sparse warnings.
|
||||
|
||||
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
|
||||
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
|
||||
---
|
||||
compat.h | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/compat.h b/compat.h
|
||||
index 346a824..35ed4d9 100644
|
||||
--- a/compat.h
|
||||
+++ b/compat.h
|
||||
@@ -309,10 +309,10 @@ static int __batadv_interface_set_mac_addr(x, y)
|
||||
/* older kernels still need to call skb_abort_seq_read() */
|
||||
#define skb_seq_read(consumed, data, st) \
|
||||
({ \
|
||||
- int len = skb_seq_read(consumed, data, st); \
|
||||
- if (len == 0) \
|
||||
+ int __len = skb_seq_read(consumed, data, st); \
|
||||
+ if (__len == 0) \
|
||||
skb_abort_seq_read(st); \
|
||||
- len; \
|
||||
+ __len; \
|
||||
})
|
||||
#endif /* < KERNEL_VERSION(3, 11, 0) */
|
||||
|
||||
--
|
||||
1.8.4.rc3
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
From 59221041095c2b83205caab3dbabc94d7a6f32f9 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Quartulli <antonio@open-mesh.com>
|
||||
Date: Wed, 11 Sep 2013 19:14:44 +0200
|
||||
Subject: [PATCH 4/4] batman-adv: set the TAG flag for the vid passed to BLA
|
||||
|
||||
When receiving or sending a packet a packet on a VLAN, the
|
||||
vid has to be marked with the TAG flag in order to make any
|
||||
component in batman-adv understand that the packet is coming
|
||||
from a really tagged network.
|
||||
|
||||
This fix the Bridge Loop Avoidance behaviour which was not
|
||||
able to send announces over VLAN interfaces.
|
||||
|
||||
Introduced by 0b1da1765fdb00ca5d53bc95c9abc70dfc9aae5b
|
||||
("batman-adv: change VID semantic in the BLA code")
|
||||
|
||||
Signed-off-by: Antonio Quartulli <antonio@open-mesh.org>
|
||||
Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
|
||||
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
|
||||
---
|
||||
soft-interface.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/soft-interface.c b/soft-interface.c
|
||||
index 0f04e1c..33b6144 100644
|
||||
--- a/soft-interface.c
|
||||
+++ b/soft-interface.c
|
||||
@@ -168,6 +168,7 @@ static int batadv_interface_tx(struct sk_buff *skb,
|
||||
case ETH_P_8021Q:
|
||||
vhdr = (struct vlan_ethhdr *)skb->data;
|
||||
vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK;
|
||||
+ vid |= BATADV_VLAN_HAS_TAG;
|
||||
|
||||
if (vhdr->h_vlan_encapsulated_proto != ethertype)
|
||||
break;
|
||||
@@ -329,6 +330,7 @@ void batadv_interface_rx(struct net_device *soft_iface,
|
||||
case ETH_P_8021Q:
|
||||
vhdr = (struct vlan_ethhdr *)skb->data;
|
||||
vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK;
|
||||
+ vid |= BATADV_VLAN_HAS_TAG;
|
||||
|
||||
if (vhdr->h_vlan_encapsulated_proto != ethertype)
|
||||
break;
|
||||
--
|
||||
1.8.4.rc3
|
||||
|
Loading…
Reference in a new issue