Skip to content

Commit 0f15d36

Browse files
ajstephensdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7571521 commit 0f15d36

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/tipc/name_table.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,9 @@ static void nameseq_list(struct name_seq *seq, struct print_buf *buf, u32 depth,
905905
struct sub_seq *sseq;
906906
char typearea[11];
907907

908+
if (seq->first_free == 0)
909+
return;
910+
908911
sprintf(typearea, "%-10u", seq->type);
909912

910913
if (depth == 1) {

0 commit comments

Comments
 (0)