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 <[email protected]>
---
 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

Reply via email to