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: correctly pass the WIFI flag on tt_response
@ 2012-11-07 22:52 Antonio Quartulli
  2012-11-08 12:54 ` [B.A.T.M.A.N.] [PATCHv2] " Antonio Quartulli
  0 siblings, 1 reply; 4+ messages in thread
From: Antonio Quartulli @ 2012-11-07 22:52 UTC (permalink / raw)
  To: b.a.t.m.a.n

When a TT response with the full table is sent, attribue flags should
be sent as well. This patch fix the flags assignment when populating
the tt_response to send back

This was introduced by ("batman-adv: detect not yet announced clients")

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---

* based on maint

 translation-table.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/translation-table.c b/translation-table.c
index 64c0012..2ff086e 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -1469,6 +1469,7 @@ batadv_tt_response_fill_table(uint16_t tt_len, uint8_t ttvn,
 	ssize_t tt_query_size = sizeof(struct batadv_tt_query_packet);
 	uint32_t i;
 	size_t len;
+	uint8_t flags;
 
 	if (tt_query_size + tt_len > primary_if->soft_iface->mtu) {
 		tt_len = primary_if->soft_iface->mtu - tt_query_size;
@@ -1502,7 +1503,8 @@ batadv_tt_response_fill_table(uint16_t tt_len, uint8_t ttvn,
 
 			memcpy(tt_change->addr, tt_common_entry->addr,
 			       ETH_ALEN);
-			tt_change->flags = BATADV_NO_FLAGS;
+			flags = tt_common_entry->flags | TT_CLIENT_WIFI;
+			tt_change->flags = flags;
 
 			tt_count++;
 			tt_change++;
-- 
1.8.0


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

* [B.A.T.M.A.N.] [PATCHv2] batman-adv: correctly pass the WIFI flag on tt_response
  2012-11-07 22:52 [B.A.T.M.A.N.] [PATCH] batman-adv: correctly pass the WIFI flag on tt_response Antonio Quartulli
@ 2012-11-08 12:54 ` Antonio Quartulli
  2012-11-08 13:21   ` [B.A.T.M.A.N.] [PATCHv3] batman-adv: correctly pass the client " Antonio Quartulli
  0 siblings, 1 reply; 4+ messages in thread
From: Antonio Quartulli @ 2012-11-08 12:54 UTC (permalink / raw)
  To: b.a.t.m.a.n

When a TT response with the full table is sent, attribue flags should
be sent as well. This patch fix the flags assignment when populating
the tt_response to send back

This was introduced by ("batman-adv: detect not yet announced clients")

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

diff --git a/translation-table.c b/translation-table.c
index 64c0012..dde3724 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -1469,6 +1469,7 @@ batadv_tt_response_fill_table(uint16_t tt_len, uint8_t ttvn,
 	ssize_t tt_query_size = sizeof(struct batadv_tt_query_packet);
 	uint32_t i;
 	size_t len;
+	uint8_t flags;
 
 	if (tt_query_size + tt_len > primary_if->soft_iface->mtu) {
 		tt_len = primary_if->soft_iface->mtu - tt_query_size;
@@ -1502,7 +1503,8 @@ batadv_tt_response_fill_table(uint16_t tt_len, uint8_t ttvn,
 
 			memcpy(tt_change->addr, tt_common_entry->addr,
 			       ETH_ALEN);
-			tt_change->flags = BATADV_NO_FLAGS;
+			flags = tt_common_entry->flags | BATADV_TT_CLIENT_WIFI;
+			tt_change->flags = flags;
 
 			tt_count++;
 			tt_change++;
-- 
1.8.0


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

* [B.A.T.M.A.N.] [PATCHv3] batman-adv: correctly pass the client flag on tt_response
  2012-11-08 12:54 ` [B.A.T.M.A.N.] [PATCHv2] " Antonio Quartulli
@ 2012-11-08 13:21   ` Antonio Quartulli
  2012-11-08 13:35     ` Marek Lindner
  0 siblings, 1 reply; 4+ messages in thread
From: Antonio Quartulli @ 2012-11-08 13:21 UTC (permalink / raw)
  To: b.a.t.m.a.n

When a TT response with the full table is sent, the client flags
should be sent as well. This patch fix the flags assignment when
populating the tt_response to send back

This was introduced by ("batman-adv: detect not yet announced clients")

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
v2:
 - added missing BATADV_
v3:
 - instead of passing the WIFI flag only, we now pass all the flags

 translation-table.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/translation-table.c b/translation-table.c
index 64c0012..fec1a00 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -1502,7 +1502,7 @@ batadv_tt_response_fill_table(uint16_t tt_len, uint8_t ttvn,
 
 			memcpy(tt_change->addr, tt_common_entry->addr,
 			       ETH_ALEN);
-			tt_change->flags = BATADV_NO_FLAGS;
+			tt_change->flags = tt_common_entry->flags;
 
 			tt_count++;
 			tt_change++;
-- 
1.8.0


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

* Re: [B.A.T.M.A.N.] [PATCHv3] batman-adv: correctly pass the client flag on tt_response
  2012-11-08 13:21   ` [B.A.T.M.A.N.] [PATCHv3] batman-adv: correctly pass the client " Antonio Quartulli
@ 2012-11-08 13:35     ` Marek Lindner
  0 siblings, 0 replies; 4+ messages in thread
From: Marek Lindner @ 2012-11-08 13:35 UTC (permalink / raw)
  To: b.a.t.m.a.n

On Thursday, November 08, 2012 21:21:11 Antonio Quartulli wrote:
> When a TT response with the full table is sent, the client flags
> should be sent as well. This patch fix the flags assignment when
> populating the tt_response to send back
> 
> This was introduced by ("batman-adv: detect not yet announced clients")
> 
> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
> ---
> v2:
>  - added missing BATADV_
> v3:
>  - instead of passing the WIFI flag only, we now pass all the flags
> 
>  translation-table.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied in revision d46bf9e.

Thanks,
Marek

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

end of thread, other threads:[~2012-11-08 13:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-07 22:52 [B.A.T.M.A.N.] [PATCH] batman-adv: correctly pass the WIFI flag on tt_response Antonio Quartulli
2012-11-08 12:54 ` [B.A.T.M.A.N.] [PATCHv2] " Antonio Quartulli
2012-11-08 13:21   ` [B.A.T.M.A.N.] [PATCHv3] batman-adv: correctly pass the client " Antonio Quartulli
2012-11-08 13:35     ` Marek Lindner

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