There can only be one default route per interface - so match anything if

RTF_DEFAULT is set in the query.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19087 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-10-19 14:42:49 +00:00
parent b01a3a33a6
commit d1d0d5c6f7
@@ -87,6 +87,12 @@ find_route(struct net_domain *_domain, const net_route *description)
while (iterator.HasNext()) {
net_route_private *route = iterator.Next();
if ((route->flags & RTF_DEFAULT) != 0
&& (description->flags & RTF_DEFAULT) != 0) {
// there can only be one default route
return route;
}
if ((route->flags & (RTF_GATEWAY | RTF_HOST | RTF_LOCAL)) ==
(description->flags & (RTF_GATEWAY | RTF_HOST | RTF_LOCAL))
&& domain->address_module->equal_masked_addresses(route->destination,