Set default IKE header initiator flag in IKEv2 only
authorMartin Willi <martin@revosec.ch>
Wed, 16 Nov 2011 15:09:02 +0000 (15:09 +0000)
committerMartin Willi <martin@revosec.ch>
Tue, 20 Mar 2012 16:30:41 +0000 (17:30 +0100)
src/libcharon/encoding/payloads/ike_header.c

index 556e422..8f37944 100644 (file)
@@ -486,7 +486,10 @@ ike_header_t *ike_header_create_version(int major, int minor)
 
        this->set_maj_version(this, major);
        this->set_min_version(this, minor);
-       this->set_initiator_flag(this, TRUE);
-
+       if (major == IKEV2_MAJOR_VERSION)
+       {
+               this->set_initiator_flag(this, TRUE);
+       }
        return this;
 }
+