Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334434
b: refs/heads/master
c: 9f0d3c2
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Oct 16, 2012
1 parent 5d69ccb commit 7418e52
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2384d6aa079de7c16c7877220d3cd4c6f4f50767
refs/heads/master: 9f0d3c2781baa1102108e16efbe640dd74564a7c
15 changes: 9 additions & 6 deletions trunk/net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -3064,14 +3064,15 @@ static struct inet6_ifaddr *if6_get_first(struct seq_file *seq, loff_t pos)
struct hlist_node *n;
hlist_for_each_entry_rcu_bh(ifa, n, &inet6_addr_lst[state->bucket],
addr_lst) {
if (!net_eq(dev_net(ifa->idev->dev), net))
continue;
/* sync with offset */
if (p < state->offset) {
p++;
continue;
}
state->offset++;
if (net_eq(dev_net(ifa->idev->dev), net))
return ifa;
return ifa;
}

/* prepare for next bucket */
Expand All @@ -3089,18 +3090,20 @@ static struct inet6_ifaddr *if6_get_next(struct seq_file *seq,
struct hlist_node *n = &ifa->addr_lst;

hlist_for_each_entry_continue_rcu_bh(ifa, n, addr_lst) {
if (!net_eq(dev_net(ifa->idev->dev), net))
continue;
state->offset++;
if (net_eq(dev_net(ifa->idev->dev), net))
return ifa;
return ifa;
}

while (++state->bucket < IN6_ADDR_HSIZE) {
state->offset = 0;
hlist_for_each_entry_rcu_bh(ifa, n,
&inet6_addr_lst[state->bucket], addr_lst) {
if (!net_eq(dev_net(ifa->idev->dev), net))
continue;
state->offset++;
if (net_eq(dev_net(ifa->idev->dev), net))
return ifa;
return ifa;
}
}

Expand Down

0 comments on commit 7418e52

Please sign in to comment.