Commit 46a3dac2 authored by David S. Miller's avatar David S. Miller

[IPV4]: Initialize ARP seqfile state in start() method.

parent 2eb55e7a
...@@ -1276,6 +1276,10 @@ static void *arp_get_idx(struct seq_file *seq, loff_t pos) ...@@ -1276,6 +1276,10 @@ static void *arp_get_idx(struct seq_file *seq, loff_t pos)
static void *arp_seq_start(struct seq_file *seq, loff_t *pos) static void *arp_seq_start(struct seq_file *seq, loff_t *pos)
{ {
struct arp_iter_state* state = seq->private;
state->is_pneigh = 0;
state->bucket = 0;
return *pos ? arp_get_idx(seq, *pos - 1) : SEQ_START_TOKEN; return *pos ? arp_get_idx(seq, *pos - 1) : SEQ_START_TOKEN;
} }
...@@ -1399,7 +1403,6 @@ static int arp_seq_open(struct inode *inode, struct file *file) ...@@ -1399,7 +1403,6 @@ static int arp_seq_open(struct inode *inode, struct file *file)
seq = file->private_data; seq = file->private_data;
seq->private = s; seq->private = s;
memset(s, 0, sizeof(*s));
out: out:
return rc; return rc;
out_kfree: out_kfree:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment