Repository : ssh://git@open-mesh.org/batman-adv
On branch : master
commit 7b6b29ff35458c2bda9a0055f8535a2246296ccd Author: Marek Lindner lindner_marek@yahoo.de Date: Thu Apr 18 04:56:03 2013 +0800
batman-adv: do not print orig nodes without nc neighbors on nc table print
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
7b6b29ff35458c2bda9a0055f8535a2246296ccd network-coding.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/network-coding.c b/network-coding.c index f8281e7..2a996bf 100644 --- a/network-coding.c +++ b/network-coding.c @@ -1759,6 +1759,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: ");