Re: [PATCH] openvpn: lack of ipv4 config on tap interface is not fatal



Hello Rafaël,

I'm not sure I understand this one either. What do you mean it's fatal
now? There's just a g_warning(). Is it that without your other patch
this produces invalid IPv4 config and causes the daemon to tear the
down the connection?

On Tue, 2015-11-03 at 19:31 +0100, Rafaël Carré wrote:
IPv4 config can be set manually
---
 src/nm-openvpn-service-openvpn-helper.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/nm-openvpn-service-openvpn-helper.c b/src/nm-
openvpn-service-openvpn-helper.c
index 512d6ce..4f93193 100644
--- a/src/nm-openvpn-service-openvpn-helper.c
+++ b/src/nm-openvpn-service-openvpn-helper.c
@@ -583,13 +583,10 @@ main (int argc, char *argv[])
      if (tmp && inet_pton (AF_INET, tmp, &temp_addr) > 0) {
              val = g_variant_new_uint32
(nm_utils_ip4_netmask_to_prefix (temp_addr.s_addr));
              g_variant_builder_add (&ip4builder, "{sv}",
NM_VPN_PLUGIN_IP4_CONFIG_PREFIX, val);
-     } else if (!tapdev) {
-             if (!has_ip4_prefix) {
-                     val = g_variant_new_uint32 (32);
-                     g_variant_builder_add (&ip4builder, "{sv}",
NM_VPN_PLUGIN_IP4_CONFIG_PREFIX, val);
-             }
-     } else
-             g_warning ("No IP4 netmask/prefix (missing or
invalid 'ifconfig_netmask')");
+     } else if (!has_ip4_prefix) {
+             val = g_variant_new_uint32 (32);
+             g_variant_builder_add (&ip4builder, "{sv}",
NM_VPN_PLUGIN_IP4_CONFIG_PREFIX, val);
+     }
 
      val = get_ip4_routes ();
      if (val)

Thanks,
Lubo


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]