From 6d12d1bb86181a1a52de76118627b8c6df3f7151 Mon Sep 17 00:00:00 2001 From: Jaehyun Kim Date: Mon, 16 May 2022 21:24:09 +0900 Subject: [PATCH] Add support for unspecified IPv6 gateway address Unspecified gateway address("::") is not permitted when setting routing table. So, if this value is passed, it must be handled appropriately. Change-Id: If04df42fc0d6233bfca79e62efb80c8a1024e7c4 Signed-off-by: Jaehyun Kim --- src/utils/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/util.c b/src/utils/util.c index 4eba47a..b39171e 100755 --- a/src/utils/util.c +++ b/src/utils/util.c @@ -850,7 +850,7 @@ int netconfig_add_route_ipv6(gchar *ip_addr, gchar *interface, gchar *gateway, u return -1; } - if (gateway != NULL) { + if (gateway != NULL && g_strcmp0(gateway, "::") != 0) { rt.rtmsg_flags |= RTF_GATEWAY; if (inet_pton(AF_INET6, gateway, &rt.rtmsg_gateway) < 0) { DBG("inet_pton failed : %s", -- 2.7.4