[network-manager-openvpn/th/ping-bgo651657: 4/7] properties: Export the ping/ping-exit/ping-restart options from openvpn
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn/th/ping-bgo651657: 4/7] properties: Export the ping/ping-exit/ping-restart options from openvpn
- Date: Mon, 10 Aug 2015 11:18:55 +0000 (UTC)
commit 3b33396f8d5e39d9f4f04abbfd419e96e8e2f8c7
Author: Federico Mena Quintero <federico gnome org>
Date: Mon Jun 15 20:11:33 2015 -0500
properties: Export the ping/ping-exit/ping-restart options from openvpn
This is part of https://bugzilla.gnome.org/show_bug.cgi?id=651657
properties/import-export.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/properties/import-export.c b/properties/import-export.c
index dc9b3e0..de277a9 100644
--- a/properties/import-export.c
+++ b/properties/import-export.c
@@ -869,6 +869,9 @@ do_export (const char *path, NMConnection *connection, GError **error)
const char *static_key = NULL;
const char *static_key_direction = NULL;
const char *port = NULL;
+ const char *ping = NULL;
+ const char *ping_exit = NULL;
+ const char *ping_restart = NULL;
const char *local_ip = NULL;
const char *remote_ip = NULL;
const char *tls_remote = NULL;
@@ -956,6 +959,18 @@ do_export (const char *path, NMConnection *connection, GError **error)
if (value && strlen (value))
port = value;
+ value = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_PING);
+ if (value && strlen (value))
+ ping = value;
+
+ value = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_PING_EXIT);
+ if (value && strlen (value))
+ ping_exit = value;
+
+ value = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_PING_RESTART);
+ if (value && strlen (value))
+ ping_restart = value;
+
value = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_RENEG_SECONDS);
if (value && strlen (value)) {
reneg_exists = TRUE;
@@ -1118,6 +1133,15 @@ do_export (const char *path, NMConnection *connection, GError **error)
if (port)
fprintf (f, "port %s\n", port);
+ if (ping)
+ fprintf (f, "ping %s\n", ping);
+
+ if (ping_exit)
+ fprintf (f, "ping-exit %s\n", ping_exit);
+
+ if (ping_restart)
+ fprintf (f, "ping-restart %s\n", ping_restart);
+
if (local_ip && remote_ip)
fprintf (f, "ifconfig %s %s\n", local_ip, remote_ip);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]