diff options
author | Grant Erickson <gerickson@nuovations.com> | 2023-12-15 22:12:23 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2023-12-16 19:45:28 +0100 |
commit | d818cf367bc305bc2c838a162b1f2fedbe0bbe2a (patch) | |
tree | e05f97f58ac528c02351098895b6c5f2e99a9c33 | |
parent | 9d3a95a2eb87fd4b98523a3366fe1a29f1f9bbd5 (diff) | |
download | connman-d818cf367bc305bc2c838a162b1f2fedbe0bbe2a.tar.gz |
wispr: Leverage '__connman_service_get_route_metric'.
This leverages '__connman_service_get_route_metric' to select an
appropriate service-specific route metric/priority when adding or
deleting WISPr host routes.
This allows multiple such routes to coexist simultaneously, supporting
"continuous" mode online checks in which one or more services may be
conducting "online" WISPr-based Internet reachability checks as they
move in and out of reachability success/failure.
-rw-r--r-- | src/wispr.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/wispr.c b/src/wispr.c index 1af880118..efc0ca2fb 100644 --- a/src/wispr.c +++ b/src/wispr.c @@ -708,6 +708,17 @@ static bool wispr_route_request(const char *address, int ai_family, return false; } + result = __connman_service_get_route_metric(wp_context->service, + &metric); + if (result < 0) { + DBG("failed to get metric for service %p (%s): %s (%d)", + wp_context->service, + connman_service_get_identifier(wp_context->service), + strerror(-result), result); + + return false; + } + DBG("service %p (%s) metric %u", wp_context->service, connman_service_get_identifier(wp_context->service), |