Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111597
b: refs/heads/master
c: 1e493d1
h: refs/heads/master
i:
  111595: 69a0e98
v: v3
  • Loading branch information
David S. Miller committed Sep 11, 2008
1 parent debd464 commit 58b3a98
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 08569908fffec3625e29eec7cf7577eaa512e719
refs/heads/master: 1e493d1946a0b26b79001c18d7312d536156ff5a
20 changes: 20 additions & 0 deletions trunk/net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,25 @@ int icmp6_dst_gc(void)
return more;
}

static void icmp6_clean_all(int (*func)(struct rt6_info *rt, void *arg),
void *arg)
{
struct dst_entry *dst, **pprev;

spin_lock_bh(&icmp6_dst_lock);
pprev = &icmp6_dst_gc_list;
while ((dst = *pprev) != NULL) {
struct rt6_info *rt = (struct rt6_info *) dst;
if (func(rt, arg)) {
*pprev = dst->next;
dst_free(dst);
} else {
pprev = &dst->next;
}
}
spin_unlock_bh(&icmp6_dst_lock);
}

static int ip6_dst_gc(struct dst_ops *ops)
{
unsigned long now = jiffies;
Expand Down Expand Up @@ -1930,6 +1949,7 @@ void rt6_ifdown(struct net *net, struct net_device *dev)
};

fib6_clean_all(net, fib6_ifdown, 0, &adn);
icmp6_clean_all(fib6_ifdown, &adn);
}

struct rt6_mtu_change_arg
Expand Down

0 comments on commit 58b3a98

Please sign in to comment.