* 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:
@@ -242,6 +242,8 @@ remove_interface_from_domain(net_interface* interface)
|
|||||||
{
|
{
|
||||||
net_domain_private* domain = (net_domain_private*)interface->domain;
|
net_domain_private* domain = (net_domain_private*)interface->domain;
|
||||||
|
|
||||||
|
invalidate_routes(domain, interface);
|
||||||
|
|
||||||
list_remove_item(&domain->interfaces, interface);
|
list_remove_item(&domain->interfaces, interface);
|
||||||
notify_interface_removed(interface);
|
notify_interface_removed(interface);
|
||||||
delete_interface((net_interface_private*)interface);
|
delete_interface((net_interface_private*)interface);
|
||||||
|
|||||||
@@ -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.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -40,7 +40,7 @@ status_t remove_route(struct net_domain* domain,
|
|||||||
const struct net_route* route);
|
const struct net_route* route);
|
||||||
status_t get_route_information(struct net_domain* domain, void* buffer,
|
status_t get_route_information(struct net_domain* domain, void* buffer,
|
||||||
size_t length);
|
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,
|
struct net_route* get_route(struct net_domain* domain,
|
||||||
const struct sockaddr* address);
|
const struct sockaddr* address);
|
||||||
status_t get_device_route(struct net_domain* domain, uint32 index,
|
status_t get_device_route(struct net_domain* domain, uint32 index,
|
||||||
|
|||||||
Reference in New Issue
Block a user