e63b782f4f823d346995a3568f3ec27ed736f25d
[feed/routing.git] / batman-adv / patches / 0008-batman-adv-Fix-speedy-join-in-gateway-client-mode.patch
1 From: Sven Eckelmann <sven@narfation.org>
2 Date: Sun, 12 Jun 2016 10:43:19 +0200
3 Subject: [PATCH] batman-adv: Fix speedy join in gateway client mode
4
5 Speedy join only works when the received packet is either broadcast or an
6 4addr unicast packet. Thus packets converted from broadcast to unicast via
7 the gateway handling code have to be converted to 4addr packets to allow
8 the receiving gateway server to add the sender address as temporary entry
9 to the translation table.
10
11 Not doing it will make the batman-adv gateway server drop the DHCP response
12 in many situations because it doesn't yet have the TT entry for the
13 destination of the DHCP response.
14
15 Fixes: 9cbc67d9da47 ("batman-adv: change interface_rx to get orig node")
16 Signed-off-by: Sven Eckelmann <sven@narfation.org>
17 ---
18 net/batman-adv/send.c | 4 ++--
19 1 file changed, 2 insertions(+), 2 deletions(-)
20
21 diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
22 index f2f1256..0103976 100644
23 --- a/net/batman-adv/send.c
24 +++ b/net/batman-adv/send.c
25 @@ -424,8 +424,8 @@ int batadv_send_skb_via_gw(struct batadv_priv *bat_priv, struct sk_buff *skb,
26 struct batadv_orig_node *orig_node;
27
28 orig_node = batadv_gw_get_selected_orig(bat_priv);
29 - return batadv_send_skb_unicast(bat_priv, skb, BATADV_UNICAST, 0,
30 - orig_node, vid);
31 + return batadv_send_skb_unicast(bat_priv, skb, BATADV_UNICAST_4ADDR,
32 + BATADV_P_DATA, orig_node, vid);
33 }
34
35 void batadv_schedule_bat_ogm(struct batadv_hard_iface *hard_iface)