diff mbox series

[27/90] connection: Add low-priority default gateway config type.

Message ID 20231206235056.322578-28-gerickson@nuovations.com (mailing list archive)
State Not Applicable, archived
Headers show
Series Add Gateway Low-priority Default Routes for Non-default Services | expand

Commit Message

Grant Erickson Dec. 6, 2023, 11:49 p.m. UTC
From: Grant Erickson <erick205@umn.edu>

This adds a low-priority gateway default route type as a parallel peer
to the existing high-priority type.
---
 src/connection.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/connection.c b/src/connection.c
index 18ab007f0893..5091a229b4d1 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;