[NetworkManager-libreswan/nm-1-0: 29/51] service: add vendor property
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [NetworkManager-libreswan/nm-1-0: 29/51] service: add vendor property
- Date: Thu, 4 Oct 2018 14:08:07 +0000 (UTC)
commit afce38364f56abeda204b26eefec2e412d1ca5ef
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Thu Aug 27 16:38:16 2015 +0200
service: add vendor property
This was added and pushed by accident; shouldn't be unconditional. However we
still need it for testing against Racoon, make it configurable in a fashion
similar to the VPNC plugin.
Fixes: b59e8b37a15ec8754a17495da2c670af8536e102
(cherry picked from commit 8c0ffb6b2e7a73f098574c227385c7f8dbbb4035)
src/nm-openswan-service.c | 3 ++-
src/nm-openswan-service.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/nm-openswan-service.c b/src/nm-openswan-service.c
index 40e56f3..7e293d0 100644
--- a/src/nm-openswan-service.c
+++ b/src/nm-openswan-service.c
@@ -137,6 +137,7 @@ static ValidProperty valid_properties[] = {
{ NM_OPENSWAN_DPDTIMEOUT, G_TYPE_INT, 0, 86400 },
{ NM_OPENSWAN_IKE, G_TYPE_STRING, 0, 0 },
{ NM_OPENSWAN_ESP, G_TYPE_STRING, 0, 0 },
+ { NM_OPENSWAN_VENDOR, G_TYPE_STRING, 0, 0 },
/* Ignored option for internal use */
{ NM_OPENSWAN_PSK_INPUT_MODES, G_TYPE_NONE, 0, 0 },
{ NM_OPENSWAN_XAUTH_PASSWORD_INPUT_MODES, G_TYPE_NONE, 0, 0 },
@@ -655,7 +656,7 @@ nm_openswan_config_write (gint fd,
write_config_option (fd, " salifetime=24h\n");
write_config_option (fd, " ikelifetime=24h\n");
write_config_option (fd, " keyingtries=1\n");
- if (libreswan)
+ if (libreswan && g_strcmp0 (nm_setting_vpn_get_data_item (s_vpn, NM_OPENSWAN_VENDOR), "Cisco") == 0)
write_config_option (fd, " cisco-unity=yes\n");
write_config_option (fd, " auto=add");
diff --git a/src/nm-openswan-service.h b/src/nm-openswan-service.h
index fed9b7c..156ce68 100644
--- a/src/nm-openswan-service.h
+++ b/src/nm-openswan-service.h
@@ -41,6 +41,7 @@
#define NM_OPENSWAN_DPDTIMEOUT "dpdtimeout"
#define NM_OPENSWAN_IKE "ike"
#define NM_OPENSWAN_ESP "esp"
+#define NM_OPENSWAN_VENDOR "vendor"
#define NM_OPENSWAN_PW_TYPE_SAVE "save"
#define NM_OPENSWAN_PW_TYPE_ASK "ask"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]