[network-manager-openvpn/nm-1-0] helper: don't add a default /32 IPv4 prefix if there's no IPv4 address
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn/nm-1-0] helper: don't add a default /32 IPv4 prefix if there's no IPv4 address
- Date: Fri, 13 Nov 2015 15:20:38 +0000 (UTC)
commit eb60d4e88e3b4545b8e5cd914d5febf6776d90ef
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Fri Nov 13 14:41:00 2015 +0100
helper: don't add a default /32 IPv4 prefix if there's no IPv4 address
This caused an (invalid) IPv4 config to be always present, upsetting the
daemon.
Based on a patch from Rafaël Carré <funman videolan org>
(cherry picked from commit 63ddc1fc336cb5456f4e607d49817268c4c859f7)
src/nm-openvpn-service-openvpn-helper.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/nm-openvpn-service-openvpn-helper.c b/src/nm-openvpn-service-openvpn-helper.c
index 2c07cff..8754f9a 100644
--- a/src/nm-openvpn-service-openvpn-helper.c
+++ b/src/nm-openvpn-service-openvpn-helper.c
@@ -676,7 +676,8 @@ main (int argc, char *argv[])
g_value_set_uint (val, nm_utils_ip4_netmask_to_prefix (temp_addr.s_addr));
g_hash_table_insert (ip4config, NM_VPN_PLUGIN_IP4_CONFIG_PREFIX, val);
} else if (!tapdev) {
- if (!g_hash_table_lookup (ip4config, NM_VPN_PLUGIN_IP4_CONFIG_PREFIX)) {
+ if ( g_hash_table_lookup (ip4config, NM_VPN_PLUGIN_IP4_CONFIG_ADDRESS)
+ && !g_hash_table_lookup (ip4config, NM_VPN_PLUGIN_IP4_CONFIG_PREFIX)) {
val = g_slice_new0 (GValue);
g_value_init (val, G_TYPE_UINT);
g_value_set_uint (val, 32);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]