From 0f15d36453bbd02d404445dace49f4ae072f44e5 Mon Sep 17 00:00:00 2001 From: Allan Stephens Date: Wed, 4 Jun 2008 17:37:59 -0700 Subject: 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 Signed-off-by: David S. Miller --- net/tipc/name_table.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'net/tipc') 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) { -- cgit v1.2.3-59-g8ed1b