NetworkManager/0010-libnm-core-0.0.0.0-is-a-valid-gateway-too.patch

30 lines
1.2 KiB
Diff

From 2958b3d1afc6c23757893837b0b4353df889794d Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Tue, 21 Jul 2015 23:07:34 +0200
Subject: [PATCH 10/11] libnm-core: 0.0.0.0 is a valid gateway too
It makes sense for point-to point links.
https://bugzilla.redhat.com/show_bug.cgi?id=1244483
(cherry picked from commit f14fd048ff84794f72892a1fe0209d56552b0e6e)
---
libnm-core/nm-setting-ip-config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libnm-core/nm-setting-ip-config.c b/libnm-core/nm-setting-ip-config.c
index 2e8d0c8..d637b5e 100644
--- a/libnm-core/nm-setting-ip-config.c
+++ b/libnm-core/nm-setting-ip-config.c
@@ -2017,7 +2017,7 @@ set_property (GObject *object, guint prop_id,
gateway = g_value_get_string (value);
g_return_if_fail (!gateway || nm_utils_ipaddr_valid (NM_SETTING_IP_CONFIG_GET_FAMILY (setting), gateway));
g_free (priv->gateway);
- priv->gateway = canonicalize_ip (NM_SETTING_IP_CONFIG_GET_FAMILY (setting), gateway, TRUE);
+ priv->gateway = canonicalize_ip (NM_SETTING_IP_CONFIG_GET_FAMILY (setting), gateway, gateway == NULL);
break;
case PROP_ROUTES:
g_ptr_array_unref (priv->routes);
--
2.4.3