Thread (15 messages) 15 messages, 2 authors, 2008-06-05
STALE6593d

[PATCH 08/13 net-next-2.6] [TIPC]: Prevent display of name table types with no publications

From: Allan Stephens <hidden>
Date: 2008-05-30 18:23:10
Subsystem: networking [general], the rest, tipc network layer · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds, Jon Maloy

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 <redacted>
---
 net/tipc/name_table.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c
index 892373e..4455f13 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) {
-- 
1.5.3.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help