The following commit has been merged in the merge/master branch: commit 5a441b8f246a72a818dbd5790433f9d179ac7681 Merge: 7ff421630feba9d4bcf18cbb8e08ad2f31dd91aa 76a7cd1d3775d31a333d958b57894ef01cefd208 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Oct 18 22:24:04 2011 +0200
Merge remote-tracking branch 'origin/standalone/next' into merge/master
diff --combined net/batman-adv/soft-interface.c index aceeabc,652fb7b..652fb7b --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c @@@ -566,7 -566,7 +566,7 @@@ static int interface_tx(struct sk_buff struct orig_node *orig_node = NULL; int data_len = skb->len, ret; short vid = -1; - bool do_bcast = false; + bool do_bcast;
if (atomic_read(&bat_priv->mesh_state) != MESH_ACTIVE) goto dropped; @@@ -600,15 -600,15 +600,15 @@@
orig_node = transtable_search(bat_priv, ethhdr->h_source, ethhdr->h_dest); - if (is_multicast_ether_addr(ethhdr->h_dest) || - (orig_node && orig_node->gw_flags)) { + do_bcast = is_multicast_ether_addr(ethhdr->h_dest); + if (do_bcast || (orig_node && orig_node->gw_flags)) { ret = gw_is_target(bat_priv, skb, orig_node);
if (ret < 0) goto dropped;
- if (ret == 0) - do_bcast = true; + if (ret) + do_bcast = false; }
/* ethernet packet should be broadcasted */ diff --combined net/batman-adv/translation-table.c index cc53f78,873fb3d..873fb3d --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@@ -1049,7 -1049,6 +1049,6 @@@ static struct sk_buff *tt_response_fill tt_response = (struct tt_query_packet *)skb_put(skb, tt_query_size + tt_len); tt_response->ttvn = ttvn; - tt_response->tt_data = htons(tt_tot);
tt_change = (struct tt_change *)(skb->data + tt_query_size); tt_count = 0; @@@ -1075,6 -1074,10 +1074,10 @@@ } rcu_read_unlock();
+ /* store in the message the number of entries we have successfully + * copied */ + tt_response->tt_data = htons(tt_count); + out: return skb; } @@@ -1722,6 -1725,8 +1725,8 @@@ static void tt_local_reset_flags(struc rcu_read_lock(); hlist_for_each_entry_rcu(tt_local_entry, node, head, hash_entry) { + if (!(tt_local_entry->flags & flags)) + continue; tt_local_entry->flags &= ~flags; atomic_inc(&bat_priv->num_local_tt); }