summaryrefslogtreecommitdiff
path: root/net/batman-adv
diff options
context:
space:
mode:
authorMarek Lindner <lindner_marek@yahoo.de>2013-04-17 20:56:03 (GMT)
committerAntonio Quartulli <ordex@autistici.org>2013-05-29 00:44:55 (GMT)
commitaa27c31265f111ff73d948a5846a3f193376491e (patch)
treebbbe8c7ca5b592a3ed477811dcf1f693ff003a03 /net/batman-adv
parente54c77f08ec62434ac8b24e402aa7b787cf42198 (diff)
downloadlinux-fsl-qoriq-aa27c31265f111ff73d948a5846a3f193376491e.tar.xz
batman-adv: do not print orig nodes without nc neighbors on nc table print
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv')
-rw-r--r--net/batman-adv/network-coding.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/batman-adv/network-coding.c b/net/batman-adv/network-coding.c
index 0787a34..22cd51f 100644
--- a/net/batman-adv/network-coding.c
+++ b/net/batman-adv/network-coding.c
@@ -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: ");