diff options
-rw-r--r-- | net/batman-adv/translation-table.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index fb6931d00cd7..ef1acfd7653c 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c | |||
@@ -999,7 +999,6 @@ static struct sk_buff *tt_response_fill_table(uint16_t tt_len, uint8_t ttvn, | |||
999 | tt_response = (struct tt_query_packet *)skb_put(skb, | 999 | tt_response = (struct tt_query_packet *)skb_put(skb, |
1000 | tt_query_size + tt_len); | 1000 | tt_query_size + tt_len); |
1001 | tt_response->ttvn = ttvn; | 1001 | tt_response->ttvn = ttvn; |
1002 | tt_response->tt_data = htons(tt_tot); | ||
1003 | 1002 | ||
1004 | tt_change = (struct tt_change *)(skb->data + tt_query_size); | 1003 | tt_change = (struct tt_change *)(skb->data + tt_query_size); |
1005 | tt_count = 0; | 1004 | tt_count = 0; |
@@ -1025,6 +1024,10 @@ static struct sk_buff *tt_response_fill_table(uint16_t tt_len, uint8_t ttvn, | |||
1025 | } | 1024 | } |
1026 | rcu_read_unlock(); | 1025 | rcu_read_unlock(); |
1027 | 1026 | ||
1027 | /* store in the message the number of entries we have successfully | ||
1028 | * copied */ | ||
1029 | tt_response->tt_data = htons(tt_count); | ||
1030 | |||
1028 | out: | 1031 | out: |
1029 | return skb; | 1032 | return skb; |
1030 | } | 1033 | } |
@@ -1668,6 +1671,8 @@ static void tt_local_reset_flags(struct bat_priv *bat_priv, uint16_t flags) | |||
1668 | rcu_read_lock(); | 1671 | rcu_read_lock(); |
1669 | hlist_for_each_entry_rcu(tt_local_entry, node, | 1672 | hlist_for_each_entry_rcu(tt_local_entry, node, |
1670 | head, hash_entry) { | 1673 | head, hash_entry) { |
1674 | if (!(tt_local_entry->flags & flags)) | ||
1675 | continue; | ||
1671 | tt_local_entry->flags &= ~flags; | 1676 | tt_local_entry->flags &= ~flags; |
1672 | atomic_inc(&bat_priv->num_local_tt); | 1677 | atomic_inc(&bat_priv->num_local_tt); |
1673 | } | 1678 | } |