Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41034
b: refs/heads/master
c: b3fdd9f
h: refs/heads/master
v: v3
  • Loading branch information
Yasuyuki Kozakai authored and David S. Miller committed Nov 22, 2006
1 parent 7d8aa37 commit d854d06
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 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: ea659e0775281e1c02556e939bf749bb4f55e50c
refs/heads/master: b3fdd9f115c776d381b30b296849f8e4046bcdaa
18 changes: 17 additions & 1 deletion trunk/net/ipv6/ip6_tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,20 @@ static int __init ip6_tunnel_init(void)
return err;
}

static void __exit ip6ip6_destroy_tunnels(void)
{
int h;
struct ip6_tnl *t;

for (h = 0; h < HASH_SIZE; h++) {
while ((t = tnls_r_l[h]) != NULL)
unregister_netdevice(t->dev);
}

t = tnls_wc[0];
unregister_netdevice(t->dev);
}

/**
* ip6_tunnel_cleanup - free resources and unregister protocol
**/
Expand All @@ -1158,7 +1172,9 @@ static void __exit ip6_tunnel_cleanup(void)
if (xfrm6_tunnel_deregister(&ip6ip6_handler))
printk(KERN_INFO "ip6ip6 close: can't deregister tunnel\n");

unregister_netdev(ip6ip6_fb_tnl_dev);
rtnl_lock();
ip6ip6_destroy_tunnels();
rtnl_unlock();
}

module_init(ip6_tunnel_init);
Expand Down

0 comments on commit d854d06

Please sign in to comment.