Set default IKE header initiator flag in IKEv2 only
[strongswan.git] / 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;
 }
+