Skip to content

Commit 580043a

Browse files
committed
Merge branch 'batman-adv/maint' of git://git.open-mesh.org/linux-merge
2 parents 113ab38 + 9d85239 commit 580043a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎net/batman-adv/translation-table.c‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,6 @@ static struct sk_buff *tt_response_fill_table(uint16_t tt_len, uint8_t ttvn,
999999
tt_response = (struct tt_query_packet *)skb_put(skb,
10001000
tt_query_size + tt_len);
10011001
tt_response->ttvn = ttvn;
1002-
tt_response->tt_data = htons(tt_tot);
10031002

10041003
tt_change = (struct tt_change *)(skb->data + tt_query_size);
10051004
tt_count = 0;
@@ -1025,6 +1024,10 @@ static struct sk_buff *tt_response_fill_table(uint16_t tt_len, uint8_t ttvn,
10251024
}
10261025
rcu_read_unlock();
10271026

1027+
/* store in the message the number of entries we have successfully
1028+
* copied */
1029+
tt_response->tt_data = htons(tt_count);
1030+
10281031
out:
10291032
return skb;
10301033
}
@@ -1668,6 +1671,8 @@ static void tt_local_reset_flags(struct bat_priv *bat_priv, uint16_t flags)
16681671
rcu_read_lock();
16691672
hlist_for_each_entry_rcu(tt_local_entry, node,
16701673
head, hash_entry) {
1674+
if (!(tt_local_entry->flags & flags))
1675+
continue;
16711676
tt_local_entry->flags &= ~flags;
16721677
atomic_inc(&bat_priv->num_local_tt);
16731678
}

0 commit comments

Comments
 (0)