Skip to content

Commit

Permalink
netfilter: nf_conntrack: ct_cpu_seq_next should increase position index
Browse files Browse the repository at this point in the history
If .next function does not change position index,
following .show function will repeat output related
to current position index.

Cc: [email protected]
Fixes: 1f4aace ("fs/seq_file.c: simplify seq_file iteration code ...")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=206283
Signed-off-by: Vasily Averin <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
  • Loading branch information
vaverin authored and ummakynes committed Mar 4, 2020
1 parent f8a0fea commit dc15af8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/nf_conntrack_standalone.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ static void *ct_cpu_seq_next(struct seq_file *seq, void *v, loff_t *pos)
*pos = cpu + 1;
return per_cpu_ptr(net->ct.stat, cpu);
}

(*pos)++;
return NULL;
}

Expand Down

0 comments on commit dc15af8

Please sign in to comment.