diff mbox series

[v2,14/60] service: Add an explicit conditional for IPv6 in 'reschedule_online_check'.

Message ID 20231221064007.2347566-15-gerickson@nuovations.com (mailing list archive)
State Superseded
Headers show
Series Complete 'continuous' Online Check Mode Implementation. | expand

Commit Message

Grant Erickson Dec. 21, 2023, 6:39 a.m. UTC
This adds an explicit conditional check for the 'type' parameter
against 'CONNMAN_IPCONFIG_TYPE_IPV6' to ensure that neither
'CONNMAN_IPCONFIG_TYPE_ALL' or 'CONNMAN_IPCONFIG_TYPE_UNKNOWN'
reschedule an IPv6 online check.
---
 src/service.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/service.c b/src/service.c
index b35a4dad1f29..0e25d4879d77 100644
--- a/src/service.c
+++ b/src/service.c
@@ -2293,8 +2293,10 @@  static void reschedule_online_check(struct connman_service *service,
 
 	if (type == CONNMAN_IPCONFIG_TYPE_IPV4)
 		redo_func = redo_wispr_ipv4;
-	else
+	else if (type == CONNMAN_IPCONFIG_TYPE_IPV6)
 		redo_func = redo_wispr_ipv6;
+	else
+		return;
 
 	DBG("updating online checkout timeout period");