aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2012-06-25 11:00:12 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2012-06-25 11:09:06 +0200
commit554a697a847fa5738ef0063f9bef9098ce206629 (patch)
treeb2cc4234877745d05e34e76ae1a0523f5f7ebe3f
parent720ba902c505241503e46949a030291c8a595bf9 (diff)
downloadstrongswan-554a697a847fa5738ef0063f9bef9098ce206629.tar.bz2
strongswan-554a697a847fa5738ef0063f9bef9098ce206629.tar.xz
support Cisco Unity VID
-rw-r--r--src/libcharon/sa/ike_sa.h5
-rw-r--r--src/libcharon/sa/ikev1/tasks/isakmp_vendor.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/src/libcharon/sa/ike_sa.h b/src/libcharon/sa/ike_sa.h
index 5b2eb4ed1..e52355962 100644
--- a/src/libcharon/sa/ike_sa.h
+++ b/src/libcharon/sa/ike_sa.h
@@ -113,6 +113,11 @@ enum ike_extension_t {
* peer supports DPD detection, RFC 3706 (or IKEv2)
*/
EXT_DPD = (1<<8),
+
+ /**
+ * peer supports Cisco Unity configuration attributes
+ */
+ EXT_CISCO_UNITY = (1<<9),
};
/**
diff --git a/src/libcharon/sa/ikev1/tasks/isakmp_vendor.c b/src/libcharon/sa/ikev1/tasks/isakmp_vendor.c
index 75af146af..4fd0ef39b 100644
--- a/src/libcharon/sa/ikev1/tasks/isakmp_vendor.c
+++ b/src/libcharon/sa/ikev1/tasks/isakmp_vendor.c
@@ -109,7 +109,7 @@ static struct {
{ "draft-ietf-ipsec-nat-t-ike-08", 0, FALSE, 16,
"\x8f\x8d\x83\x82\x6d\x24\x6b\x6f\xc7\xa8\xa6\xa4\x28\xc1\x1d\xe8"},
- { "Cisco Unity", 0, FALSE, 16,
+ { "Cisco Unity", EXT_CISCO_UNITY, FALSE, 16,
"\x12\xf5\xf2\x8c\x45\x71\x68\xa9\x70\x2d\x9f\xe2\x74\xcc\x01\x00"},
};
@@ -117,15 +117,18 @@ METHOD(task_t, build, status_t,
private_isakmp_vendor_t *this, message_t *message)
{
vendor_id_payload_t *vid_payload;
- bool strongswan;
+ bool strongswan, cisco_unity;
int i;
strongswan = lib->settings->get_bool(lib->settings,
"%s.send_vendor_id", FALSE, charon->name);
+ cisco_unity = lib->settings->get_bool(lib->settings,
+ "%s.cisco_unity", FALSE, charon->name);
for (i = 0; i < countof(vendor_ids); i++)
{
if (vendor_ids[i].send ||
- (vendor_ids[i].extension == EXT_STRONGSWAN && strongswan))
+ (vendor_ids[i].extension == EXT_STRONGSWAN && strongswan) ||
+ (vendor_ids[i].extension == EXT_CISCO_UNITY && cisco_unity))
{
vid_payload = vendor_id_payload_create_data(VENDOR_ID_V1,
chunk_clone(chunk_create(vendor_ids[i].id, vendor_ids[i].len)));