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
This commit is contained in:
parent
04858e7ee4
commit
0346e9733a
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user