* We need to invalidate all routes belonging to the interface when removing it.

* This fixes the second problem mentioned in bug #6243, and therefore the bug
  itself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37692 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2010-07-22 13:07:12 +00:00
parent 4ea113cd53
commit 437ecdb9d5
2 changed files with 4 additions and 2 deletions
@@ -242,6 +242,8 @@ remove_interface_from_domain(net_interface* interface)
{
net_domain_private* domain = (net_domain_private*)interface->domain;
invalidate_routes(domain, interface);
list_remove_item(&domain->interfaces, interface);
notify_interface_removed(interface);
delete_interface((net_interface_private*)interface);
+2 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2006-2009, Haiku, Inc. All Rights Reserved.
* Copyright 2006-2010, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
@@ -40,7 +40,7 @@ status_t remove_route(struct net_domain* domain,
const struct net_route* route);
status_t get_route_information(struct net_domain* domain, void* buffer,
size_t length);
void invalidate_routes(net_domain* , net_interface* );
void invalidate_routes(net_domain* domain, net_interface* interface);
struct net_route* get_route(struct net_domain* domain,
const struct sockaddr* address);
status_t get_device_route(struct net_domain* domain, uint32 index,