public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] batman-adv: don't redirect tt_request for me
@ 2012-06-14 21:27 Antonio Quartulli
  2012-06-14 21:36 ` Antonio Quartulli
  2012-06-14 21:38 ` [B.A.T.M.A.N.] [PATCHv2] batman-adv: don't reroute " Antonio Quartulli
  0 siblings, 2 replies; 10+ messages in thread
From: Antonio Quartulli @ 2012-06-14 21:27 UTC (permalink / raw)
  To: b.a.t.m.a.n

If a tt_request is directed to me, it never has to be redirected

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
 translation-table.c |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/translation-table.c b/translation-table.c
index 2a6d7d6..c32c5f6 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -1648,7 +1648,7 @@ out:
 
 }
 
-static bool
+static void
 batadv_send_my_tt_response(struct batadv_priv *bat_priv,
 			   struct batadv_tt_query_packet *tt_request)
 {
@@ -1656,7 +1656,6 @@ batadv_send_my_tt_response(struct batadv_priv *bat_priv,
 	struct batadv_neigh_node *neigh_node = NULL;
 	struct batadv_hard_iface *primary_if = NULL;
 	uint8_t my_ttvn, req_ttvn, ttvn;
-	int ret = false;
 	unsigned char *tt_buff;
 	bool full_table;
 	uint16_t tt_len, tt_tot;
@@ -1751,7 +1750,6 @@ batadv_send_my_tt_response(struct batadv_priv *bat_priv,
 	batadv_inc_counter(bat_priv, BATADV_CNT_TT_RESPONSE_TX);
 
 	batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr);
-	ret = true;
 	goto out;
 
 unlock:
@@ -1765,8 +1763,6 @@ out:
 		batadv_hardif_free_ref(primary_if);
 	if (!ret)
 		kfree_skb(skb);
-	/* This packet was for me, so it doesn't need to be re-routed */
-	return true;
 }
 
 bool batadv_send_tt_response(struct batadv_priv *bat_priv,
@@ -1777,7 +1773,9 @@ bool batadv_send_tt_response(struct batadv_priv *bat_priv,
 		if (batadv_bla_is_backbone_gw_orig(bat_priv, tt_request->src))
 			return true;
 
-		return batadv_send_my_tt_response(bat_priv, tt_request);
+		batadv_send_my_tt_response(bat_priv, tt_request);
+		/* This packet was for me, so it never needs to be re-routed */
+		return true;
 	} else {
 		return batadv_send_other_tt_response(bat_priv, tt_request);
 	}
-- 
1.7.9.4


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

end of thread, other threads:[~2012-06-17 18:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-14 21:27 [B.A.T.M.A.N.] [PATCH] batman-adv: don't redirect tt_request for me Antonio Quartulli
2012-06-14 21:36 ` Antonio Quartulli
2012-06-14 21:38 ` [B.A.T.M.A.N.] [PATCHv2] batman-adv: don't reroute " Antonio Quartulli
2012-06-15 19:50   ` Marek Lindner
2012-06-15 20:20     ` Antonio Quartulli
2012-06-15 20:21       ` Antonio Quartulli
2012-06-16  6:27   ` [B.A.T.M.A.N.] [PATCHv3] batman-adv: don't try to re-route " Antonio Quartulli
2012-06-16 19:00     ` Marek Lindner
2012-06-16 22:11       ` Antonio Quartulli
2012-06-17 18:05         ` Antonio Quartulli

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