diff options
author | Martin Willi <martin@strongswan.org> | 2005-11-18 13:59:21 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2005-11-18 13:59:21 +0000 |
commit | 7b3d13891920cd935a876019f3220cc598fb4486 (patch) | |
tree | 325de74bbf409f3d1df99f4119851f704f672e2e /Source/charon/payloads/ike_header.c | |
parent | 4f2c92d8e2ee4e35e1b05358a8e34b1b13786167 (diff) | |
download | strongswan-7b3d13891920cd935a876019f3220cc598fb4486.tar.bz2 strongswan-7b3d13891920cd935a876019f3220cc598fb4486.tar.xz |
- changed ike_sa_id interface
- definition of private ike_sa methods
Diffstat (limited to 'Source/charon/payloads/ike_header.c')
-rw-r--r-- | Source/charon/payloads/ike_header.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/charon/payloads/ike_header.c b/Source/charon/payloads/ike_header.c index 9141e846d..18c9e00b5 100644 --- a/Source/charon/payloads/ike_header.c +++ b/Source/charon/payloads/ike_header.c @@ -173,12 +173,24 @@ static status_t verify(private_ike_header_t *this) /* unsupported exchange type */ return FAILED; } - if ((this->initiator_spi == 0) && (this->responder_spi != 0)) + if (this->initiator_spi == 0) { /* initiator spi not set */ return FAILED; } + if ((this->responder_spi == 0) && (!this->flags.initiator)) + { + /* must be original initiator*/ + return FAILED; + } + + if ((this->responder_spi == 0) && (this->flags.response)) + { + /* must be request*/ + return FAILED; + } + /* verification of version is not done in here */ return SUCCESS; |