aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Erickson <erick205@umn.edu>2023-12-04 17:50:22 -0800
committerMarcel Holtmann <marcel@holtmann.org>2023-12-08 01:55:44 +0100
commit06f3f9675d6cc2da88ed2352c023d30b36a236b5 (patch)
tree75bb9c423bc50ee09a9b4354559e751f6b1ae324
parent2549d8aadfc7bc8bd1bc6895ff16ae55492f7dfa (diff)
downloadconnman-06f3f9675d6cc2da88ed2352c023d30b36a236b5.tar.gz
connection: Add low-priority default gateway config type.
This adds a low-priority gateway default route type as a parallel peer to the existing high-priority type.
-rw-r--r--src/connection.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/connection.c b/src/connection.c
index 18ab007f0..5091a229b 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -119,7 +119,13 @@ enum gateway_config_type {
* Indicates the gateway, or default router, is a high-priority
* (that is, metric 0) default route.
*/
- CONNMAN_GATEWAY_CONFIG_TYPE_HIGH_PRIORITY_DEFAULT = 1
+ CONNMAN_GATEWAY_CONFIG_TYPE_HIGH_PRIORITY_DEFAULT = 1,
+
+ /**
+ * Indicates the gateway, or default router, is a low-priority
+ * (that is, metric > 0) default route.
+ */
+ CONNMAN_GATEWAY_CONFIG_TYPE_LOW_PRIORITY_DEFAULT = 2
};
struct gateway_config {
@@ -292,6 +298,8 @@ static const char *gateway_config_type2string(enum gateway_config_type type)
return "none";
case CONNMAN_GATEWAY_CONFIG_TYPE_HIGH_PRIORITY_DEFAULT:
return "high-priority default";
+ case CONNMAN_GATEWAY_CONFIG_TYPE_LOW_PRIORITY_DEFAULT:
+ return "low-priority default";
}
return NULL;