summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eckelmann <sven.eckelmann@open-mesh.com>2016-06-17 15:54:03 +0200
committerSven Eckelmann <sven.eckelmann@open-mesh.com>2016-07-06 15:36:23 +0200
commit0d86d08be9a696f33ef2eaed0516e459a34a083e (patch)
treee42138af06fd114020c3dd4e12229700a2fc2e13
parent14e98d86ac7a0e7725fb3a38fa8d2c643d03db50 (diff)
batman-adv: Fix speedy join in gateway client mode
Speedy join only works when the received packet is either broadcast or an 4addr unicast packet. Thus packets converted from broadcast to unicast via the gateway handling code have to be converted to 4addr packets to allow the receiving gateway server to add the sender address as temporary entry to the translation table. Not doing it will make the batman-adv gateway server drop the DHCP response in many situations because it doesn't yet have the TT entry for the destination of the DHCP response. Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
-rw-r--r--batman-adv/Makefile2
-rw-r--r--batman-adv/patches/0022-batman-adv-Fix-speedy-join-in-gateway-client-mode.patch35
2 files changed, 36 insertions, 1 deletions
diff --git a/batman-adv/Makefile b/batman-adv/Makefile
index d222c0b..e8334d5 100644
--- a/batman-adv/Makefile
+++ b/batman-adv/Makefile
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=batman-adv
PKG_VERSION:=2016.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_MD5SUM:=8c8e449009b4d29512d26ee308960bb5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
diff --git a/batman-adv/patches/0022-batman-adv-Fix-speedy-join-in-gateway-client-mode.patch b/batman-adv/patches/0022-batman-adv-Fix-speedy-join-in-gateway-client-mode.patch
new file mode 100644
index 0000000..fa61a1b
--- /dev/null
+++ b/batman-adv/patches/0022-batman-adv-Fix-speedy-join-in-gateway-client-mode.patch
@@ -0,0 +1,35 @@
+From: Sven Eckelmann <sven@narfation.org>
+Date: Sun, 12 Jun 2016 10:43:19 +0200
+Subject: [PATCH] batman-adv: Fix speedy join in gateway client mode
+
+Speedy join only works when the received packet is either broadcast or an
+4addr unicast packet. Thus packets converted from broadcast to unicast via
+the gateway handling code have to be converted to 4addr packets to allow
+the receiving gateway server to add the sender address as temporary entry
+to the translation table.
+
+Not doing it will make the batman-adv gateway server drop the DHCP response
+in many situations because it doesn't yet have the TT entry for the
+destination of the DHCP response.
+
+Fixes: 9cbc67d9da47 ("batman-adv: change interface_rx to get orig node")
+Signed-off-by: Sven Eckelmann <sven@narfation.org>
+---
+ net/batman-adv/send.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
+index 7641785..e5be212 100644
+--- a/net/batman-adv/send.c
++++ b/net/batman-adv/send.c
+@@ -423,8 +423,8 @@ int batadv_send_skb_via_gw(struct batadv_priv *bat_priv, struct sk_buff *skb,
+ struct batadv_orig_node *orig_node;
+
+ orig_node = batadv_gw_get_selected_orig(bat_priv);
+- return batadv_send_skb_unicast(bat_priv, skb, BATADV_UNICAST, 0,
+- orig_node, vid);
++ return batadv_send_skb_unicast(bat_priv, skb, BATADV_UNICAST_4ADDR,
++ BATADV_P_DATA, orig_node, vid);
+ }
+
+ void batadv_schedule_bat_ogm(struct batadv_hard_iface *hard_iface)