diff options
author | green <green@FreeBSD.org> | 2002-03-05 17:50:35 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 2002-03-05 17:50:35 +0000 |
commit | afefb7366e703a4eff31425a289fc3c1633f1cf4 (patch) | |
tree | 0e04a8e9f88793f76625302803b12928d3d8a217 | |
parent | df86de23e6b8202628a2b85ebc74042baff56752 (diff) | |
download | FreeBSD-src-afefb7366e703a4eff31425a289fc3c1633f1cf4.zip FreeBSD-src-afefb7366e703a4eff31425a289fc3c1633f1cf4.tar.gz |
Use revoke_and_destroy_dev() instead of destroy_dev() when removing /dev/net
pseudo-devices when an interface goes away. Otherwise, an open /dev/net/foo0
when the interface is removed can cause a crash.
Not objected to by: jlemon
-rw-r--r-- | sys/net/if.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 3cbf56d..fe1f7f7 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -462,7 +462,7 @@ if_detach(ifp) * Clean up all addresses. */ ifaddr_byindex(ifp->if_index) = NULL; - destroy_dev(ifdev_byindex(ifp->if_index)); + revoke_and_destroy_dev(ifdev_byindex(ifp->if_index)); ifdev_byindex(ifp->if_index) = NULL; while (if_index > 0 && ifaddr_byindex(if_index) == NULL) |