aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/translation-table.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/batman-adv/translation-table.c')
-rw-r--r--net/batman-adv/translation-table.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index cc53f78e448c..873fb3d8e56f 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -1049,7 +1049,6 @@ static struct sk_buff *tt_response_fill_table(uint16_t tt_len, uint8_t ttvn,
1049 tt_response = (struct tt_query_packet *)skb_put(skb, 1049 tt_response = (struct tt_query_packet *)skb_put(skb,
1050 tt_query_size + tt_len); 1050 tt_query_size + tt_len);
1051 tt_response->ttvn = ttvn; 1051 tt_response->ttvn = ttvn;
1052 tt_response->tt_data = htons(tt_tot);
1053 1052
1054 tt_change = (struct tt_change *)(skb->data + tt_query_size); 1053 tt_change = (struct tt_change *)(skb->data + tt_query_size);
1055 tt_count = 0; 1054 tt_count = 0;
@@ -1075,6 +1074,10 @@ static struct sk_buff *tt_response_fill_table(uint16_t tt_len, uint8_t ttvn,
1075 } 1074 }
1076 rcu_read_unlock(); 1075 rcu_read_unlock();
1077 1076
1077 /* store in the message the number of entries we have successfully
1078 * copied */
1079 tt_response->tt_data = htons(tt_count);
1080
1078out: 1081out:
1079 return skb; 1082 return skb;
1080} 1083}
@@ -1722,6 +1725,8 @@ static void tt_local_reset_flags(struct bat_priv *bat_priv, uint16_t flags)
1722 rcu_read_lock(); 1725 rcu_read_lock();
1723 hlist_for_each_entry_rcu(tt_local_entry, node, 1726 hlist_for_each_entry_rcu(tt_local_entry, node,
1724 head, hash_entry) { 1727 head, hash_entry) {
1728 if (!(tt_local_entry->flags & flags))
1729 continue;
1725 tt_local_entry->flags &= ~flags; 1730 tt_local_entry->flags &= ~flags;
1726 atomic_inc(&bat_priv->num_local_tt); 1731 atomic_inc(&bat_priv->num_local_tt);
1727 } 1732 }