From: Jaehyun Kim Date: Mon, 16 May 2022 12:24:09 +0000 (+0900) Subject: Add support for unspecified IPv6 gateway address X-Git-Tag: accepted/tizen/unified/20220524.050423^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F92%2F275092%2F1;p=platform%2Fcore%2Fconnectivity%2Fnet-config.git 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 --- 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",