diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-07-28 19:43:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-30 17:19:19 -0400 |
commit | 72fc939789dbe7ca091b50b686d45ac0df15417a (patch) | |
tree | 450d68ac3788c335ac33c3ecc14be1e294f78a20 /drivers/net/pppoe.c | |
parent | f0c5b35c6c93c89a9d8ccab19b0b4842f5dfddc5 (diff) |
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>
Diffstat (limited to 'drivers/net/pppoe.c')
-rw-r--r-- | drivers/net/pppoe.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index f0031f1f97e5..5f2090233d7b 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c | |||
@@ -1063,6 +1063,7 @@ static void *pppoe_seq_next(struct seq_file *seq, void *v, loff_t *pos) | |||
1063 | else { | 1063 | else { |
1064 | int hash = hash_item(po->pppoe_pa.sid, po->pppoe_pa.remote); | 1064 | int hash = hash_item(po->pppoe_pa.sid, po->pppoe_pa.remote); |
1065 | 1065 | ||
1066 | po = NULL; | ||
1066 | while (++hash < PPPOE_HASH_SIZE) { | 1067 | while (++hash < PPPOE_HASH_SIZE) { |
1067 | po = pn->hash_table[hash]; | 1068 | po = pn->hash_table[hash]; |
1068 | if (po) | 1069 | if (po) |