Skip to content

Commit

Permalink
batman-adv: do not print orig nodes without nc neighbors on nc table …
Browse files Browse the repository at this point in the history
…print

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
  • Loading branch information
Marek Lindner authored and Antonio Quartulli committed May 29, 2013
1 parent e54c77f commit aa27c31
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions net/batman-adv/network-coding.c
Original file line number Diff line number Diff line change
Expand Up @@ -1763,6 +1763,13 @@ int batadv_nc_nodes_seq_print_text(struct seq_file *seq, void *offset)
/* For each orig_node in this bin */
rcu_read_lock();
hlist_for_each_entry_rcu(orig_node, head, hash_entry) {
/* no need to print the orig node if it does not have
* network coding neighbors
*/
if (list_empty(&orig_node->in_coding_list) &&
list_empty(&orig_node->out_coding_list))
continue;

seq_printf(seq, "Node: %pM\n", orig_node->orig);

seq_puts(seq, " Ingoing: ");
Expand Down

0 comments on commit aa27c31

Please sign in to comment.