pppoe: fix /proc/net/pppoe

If a socket is hashed in last slot of pppoe hash table (PPPOE_HASH_SIZE-1)
we report it many times (up to filling seq buffer)
(Only the last socket of last slot)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Eric Dumazet 2009-07-28 23:43:08 +00:00 committed by David S. Miller
parent f0c5b35c6c
commit 72fc939789

View file

@ -1063,6 +1063,7 @@ static void *pppoe_seq_next(struct seq_file *seq, void *v, loff_t *pos)
else { else {
int hash = hash_item(po->pppoe_pa.sid, po->pppoe_pa.remote); int hash = hash_item(po->pppoe_pa.sid, po->pppoe_pa.remote);
po = NULL;
while (++hash < PPPOE_HASH_SIZE) { while (++hash < PPPOE_HASH_SIZE) {
po = pn->hash_table[hash]; po = pn->hash_table[hash];
if (po) if (po)