summaryrefslogtreecommitdiff
path: root/net/tipc/name_table.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2008-06-04 17:37:59 -0700
committerDavid S. Miller <davem@davemloft.net>2008-06-04 17:37:59 -0700
commit0f15d36453bbd02d404445dace49f4ae072f44e5 (patch)
tree3b71e05968d8fbf202730d817d655bc399822271 /net/tipc/name_table.c
parent757152175666681d54d370500e41a756cfedd4fc (diff)
tipc: Prevent display of name table types with no publications
This patch adds a check to prevent TIPC's name table display code from listing a name type entry if it exists only to hold subscription info, rather than published names. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/name_table.c')
-rw-r--r--net/tipc/name_table.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c
index 892373e498e4..4455f13cfaf6 100644
--- a/net/tipc/name_table.c
+++ b/net/tipc/name_table.c
@@ -905,6 +905,9 @@ static void nameseq_list(struct name_seq *seq, struct print_buf *buf, u32 depth,
struct sub_seq *sseq;
char typearea[11];
+ if (seq->first_free == 0)
+ return;
+
sprintf(typearea, "%-10u", seq->type);
if (depth == 1) {