aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2007-01-21 08:45:10 +0000
committerAndreas Steffen <andreas.steffen@strongswan.org>2007-01-21 08:45:10 +0000
commit4af33bd7a28dc362457946655825656d53455482 (patch)
treed164bf83bfc5331c08a91f2b44f10518f705f12d /src
parent365e8386874b1b3166cb92f9ba8223b5538a42e0 (diff)
downloadstrongswan-4af33bd7a28dc362457946655825656d53455482.tar.bz2
strongswan-4af33bd7a28dc362457946655825656d53455482.tar.xz
added Cisco Unity ModeCfg attributes
Diffstat (limited to 'src')
-rw-r--r--src/pluto/constants.c23
-rw-r--r--src/pluto/constants.h24
-rw-r--r--src/pluto/modecfg.c4
3 files changed, 48 insertions, 3 deletions
diff --git a/src/pluto/constants.c b/src/pluto/constants.c
index ed8073b0b..1fc5ec422 100644
--- a/src/pluto/constants.c
+++ b/src/pluto/constants.c
@@ -708,7 +708,7 @@ static const char *const xauth_type_name[] = {
};
enum_names xauth_type_names =
- { XAUTH_TYPE_GENERIC, XAUTH_TYPE_SKEY, xauth_type_name, NULL};
+ { XAUTH_TYPE_GENERIC, XAUTH_TYPE_SKEY, xauth_type_name, NULL};
/* From draft-beaulieu-ike-xauth */
static const char *const xauth_attr_tv_name[] = {
@@ -726,6 +726,24 @@ enum_names xauth_attr_tv_names = {
XAUTH_TYPE + ISAKMP_ATTR_AF_TV,
XAUTH_STATUS + ISAKMP_ATTR_AF_TV, xauth_attr_tv_name, NULL };
+static const char *const unity_attr_name[] = {
+ "UNITY_BANNER",
+ "UNITY_SAVE_PASSWD",
+ "UNITY_DEF_DOMAIN",
+ "UNITY_SPLITDNS_NAME",
+ "UNITY_SPLIT_INCLUDE",
+ "UNITY_NATT_PORT",
+ "UNITY_LOCAL_LAN",
+ "UNITY_PFS",
+ "UNITY_FW_TYPE",
+ "UNITY_BACKUP_SERVERS",
+ "UNITY_DDNS_HOSTNAME",
+};
+
+enum_names unity_attr_names =
+ { UNITY_BANNER , UNITY_DDNS_HOSTNAME, unity_attr_name , &xauth_attr_tv_names };
+
+
static const char *const xauth_attr_name[] = {
"XAUTH_USER_NAME",
"XAUTH_USER_PASSWORD",
@@ -739,7 +757,7 @@ static const char *const xauth_attr_name[] = {
};
enum_names xauth_attr_names =
- { XAUTH_USER_NAME , XAUTH_ANSWER, xauth_attr_name , &xauth_attr_tv_names };
+ { XAUTH_USER_NAME , XAUTH_ANSWER, xauth_attr_name , &unity_attr_names };
static const char *const modecfg_attr_name[] = {
"INTERNAL_IP4_ADDRESS",
@@ -757,7 +775,6 @@ static const char *const modecfg_attr_name[] = {
"INTERNAL_IP4_SUBNET",
"SUPPORTED_ATTRIBUTES",
"INTERNAL_IP6_SUBNET",
- NULL
};
enum_names modecfg_attr_names =
diff --git a/src/pluto/constants.h b/src/pluto/constants.h
index 205203f12..2f3587db2 100644
--- a/src/pluto/constants.h
+++ b/src/pluto/constants.h
@@ -1,3 +1,4 @@
+
/* manifest constants
* Copyright (C) 1997 Angelos D. Keromytis.
* Copyright (C) 1998-2002 D. Hugh Redelmeier.
@@ -666,6 +667,7 @@ extern enum_names attr_msg_type_names;
#define MODECFG_ROOF 16
extern enum_names modecfg_attr_names;
+
/* XAUTH attribute values */
#define XAUTH_TYPE 16520
#define XAUTH_USER_NAME 16521
@@ -679,15 +681,37 @@ extern enum_names modecfg_attr_names;
#define XAUTH_ANSWER 16529
#define XAUTH_BASE XAUTH_TYPE
+#define XAUTH_ROOF 16530
extern enum_names xauth_attr_names;
+/* ISAKMP mode config attributes specific to the Unity vendor Id */
+#define UNITY_BANNER 28672
+#define UNITY_SAVE_PASSWD 28673
+#define UNITY_DEF_DOMAIN 28674
+#define UNITY_SPLITDNS_NAME 28675
+#define UNITY_SPLIT_INCLUDE 28676
+#define UNITY_NATT_PORT 28677
+#define UNITY_LOCAL_LAN 28678
+#define UNITY_PFS 28679
+#define UNITY_FW_TYPE 28680
+#define UNITY_BACKUP_SERVERS 28681
+#define UNITY_DDNS_HOSTNAME 28682
+
+#define UNITY_BASE UNITY_BANNER
+
+extern enum_names unity_attr_names;
+
/* XAUTH authentication types */
#define XAUTH_TYPE_GENERIC 0
#define XAUTH_TYPE_CHAP 1
#define XAUTH_TYPE_OTP 2
#define XAUTH_TYPE_SKEY 3
+/* Values for XAUTH_STATUS */
+#define XAUTH_STATUS_FAIL 0
+#define XAUTH_STATUS_OK 1
+
extern enum_names xauth_type_names;
/* Exchange types
diff --git a/src/pluto/modecfg.c b/src/pluto/modecfg.c
index 2fcc27deb..2fff7a3a0 100644
--- a/src/pluto/modecfg.c
+++ b/src/pluto/modecfg.c
@@ -357,6 +357,10 @@ modecfg_build_msg(struct state *st, pb_stream *rbody
{
attr_type = XAUTH_BASE;
}
+ else if (attr_type == XAUTH_ROOF)
+ {
+ attr_type = UNITY_BASE;
+ }
attr_set >>= 1;
}
}