public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [RFC 1/2] batman-adv: Fix speedy join in gateway client mode
@ 2016-06-11 20:27 Sven Eckelmann
  2016-06-11 20:27 ` [B.A.T.M.A.N.] [RFC 2/2] batman-adv: Use broadcast as fallback for gateway replies Sven Eckelmann
  0 siblings, 1 reply; 3+ messages in thread
From: Sven Eckelmann @ 2016-06-11 20:27 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: a

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 node to
the translation table.

Not doing it will make batman-adv 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@narfation.org>
---
This is completely untested. The RFC was submitted to better explain a
problem to Antonio. This problems was noticed in real world setups but
these patches were not yet tested in these setups.

 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 49836da..0e9445b 100644
--- a/net/batman-adv/send.c
+++ b/net/batman-adv/send.c
@@ -426,8 +426,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_forw_packet_free(struct batadv_forw_packet *forw_packet)
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-01  7:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-11 20:27 [B.A.T.M.A.N.] [RFC 1/2] batman-adv: Fix speedy join in gateway client mode Sven Eckelmann
2016-06-11 20:27 ` [B.A.T.M.A.N.] [RFC 2/2] batman-adv: Use broadcast as fallback for gateway replies Sven Eckelmann
2016-07-01  7:30   ` Linus Lüssing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox