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:
@@ -87,6 +87,12 @@ find_route(struct net_domain *_domain, const net_route *description)
|
|||||||
while (iterator.HasNext()) {
|
while (iterator.HasNext()) {
|
||||||
net_route_private *route = iterator.Next();
|
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)) ==
|
if ((route->flags & (RTF_GATEWAY | RTF_HOST | RTF_LOCAL)) ==
|
||||||
(description->flags & (RTF_GATEWAY | RTF_HOST | RTF_LOCAL))
|
(description->flags & (RTF_GATEWAY | RTF_HOST | RTF_LOCAL))
|
||||||
&& domain->address_module->equal_masked_addresses(route->destination,
|
&& domain->address_module->equal_masked_addresses(route->destination,
|
||||||
|
|||||||
Reference in New Issue
Block a user