continue;
}
}
- if (route->oif)
- { /* no src, but an interface - get address from it */
- route->src_host = get_interface_address(this, route->oif,
- msg->rtm_family, dest, candidate);
- if (route->src_host)
- { /* more of the same */
- if (!candidate ||
- candidate->ip_equals(candidate, route->src_host))
- {
- best = route;
- break;
- }
- best = best ?: route;
- continue;
- }
- }
if (route->gtw.ptr)
{ /* no src, no iface, but a gateway - lookup src to reach gtw */
host_t *gtw;
best = best ?: route;
}
}
+ if (route->oif)
+ { /* no src, but an interface - get address from it */
+ route->src_host = get_interface_address(this, route->oif,
+ msg->rtm_family, dest, candidate);
+ if (route->src_host)
+ { /* more of the same */
+ if (!candidate ||
+ candidate->ip_equals(candidate, route->src_host))
+ {
+ best = route;
+ break;
+ }
+ best = best ?: route;
+ continue;
+ }
+ }
}
enumerator->destroy(enumerator);