aboutsummaryrefslogtreecommitdiffstats
path: root/src/pluto/ipsec_doi.c
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2007-09-02 11:13:24 +0000
committerAndreas Steffen <andreas.steffen@strongswan.org>2007-09-02 11:13:24 +0000
commit0e3073608dcad5f99c0926ec3c18262eac899ca3 (patch)
tree442f46c06e455ecb1eb948f6d8fae9f07ced2ae1 /src/pluto/ipsec_doi.c
parent354242c55a6527fd8f42acc1e8ee65d5e8a3faa4 (diff)
downloadstrongswan-0e3073608dcad5f99c0926ec3c18262eac899ca3.tar.bz2
strongswan-0e3073608dcad5f99c0926ec3c18262eac899ca3.tar.xz
re-introduced the XAUTH_VID compile option
Diffstat (limited to 'src/pluto/ipsec_doi.c')
-rw-r--r--src/pluto/ipsec_doi.c33
1 files changed, 24 insertions, 9 deletions
diff --git a/src/pluto/ipsec_doi.c b/src/pluto/ipsec_doi.c
index 1183f9c88..14aec4495 100644
--- a/src/pluto/ipsec_doi.c
+++ b/src/pluto/ipsec_doi.c
@@ -80,6 +80,15 @@
#endif /* !VENDORID */
/*
+ * are we sending an XAUTH VID?
+ */
+#ifdef XAUTH_VID
+#define SEND_XAUTH_VID 1
+#else /* !XAUTH_VID */
+#define SEND_XAUTH_VID 0
+#endif /* !XAUTH_VID */
+
+/*
* are we sending a Cisco Unity VID?
*/
#ifdef CISCO_QUIRKS
@@ -899,7 +908,7 @@ main_outI1(int whack_sock, struct connection *c, struct state *predecessor
vids_to_send++;
if (c->spd.this.cert.type == CERT_PGP)
vids_to_send++;
- /* always send XAUTH Vendor ID */
+ if (SEND_XAUTH_VID)
vids_to_send++;
/* always send DPD Vendor ID */
vids_to_send++;
@@ -993,11 +1002,14 @@ main_outI1(int whack_sock, struct connection *c, struct state *predecessor
}
/* Announce our ability to do eXtended AUTHentication to the peer */
- if (!out_vendorid(vids_to_send-- ? ISAKMP_NEXT_VID : ISAKMP_NEXT_NONE
- , &rbody, VID_MISC_XAUTH))
+ if (SEND_XAUTH_VID)
{
- reset_cur_state();
- return STF_INTERNAL_ERROR;
+ if (!out_vendorid(vids_to_send-- ? ISAKMP_NEXT_VID : ISAKMP_NEXT_NONE
+ , &rbody, VID_MISC_XAUTH))
+ {
+ reset_cur_state();
+ return STF_INTERNAL_ERROR;
+ }
}
/* Announce our ability to do Dead Peer Detection to the peer */
@@ -3114,7 +3126,7 @@ main_inI1_outR1(struct msg_digest *md)
vids_to_send++;
if (md->openpgp)
vids_to_send++;
- /* always send XAUTH Vendor ID */
+ if (SEND_XAUTH_VID)
vids_to_send++;
/* always send DPD Vendor ID */
vids_to_send++;
@@ -3182,10 +3194,13 @@ main_inI1_outR1(struct msg_digest *md)
}
/* Announce our ability to do eXtended AUTHentication to the peer */
- if (!out_vendorid(vids_to_send-- ? ISAKMP_NEXT_VID : ISAKMP_NEXT_NONE
- , &md->rbody, VID_MISC_XAUTH))
+ if (SEND_XAUTH_VID)
{
- return STF_INTERNAL_ERROR;
+ if (!out_vendorid(vids_to_send-- ? ISAKMP_NEXT_VID : ISAKMP_NEXT_NONE
+ , &md->rbody, VID_MISC_XAUTH))
+ {
+ return STF_INTERNAL_ERROR;
+ }
}
/* Announce our ability to do Dead Peer Detection to the peer */