Hardcode some SA lifetimes until we can configure them dynamically
authorMartin Willi <martin@revosec.ch>
Tue, 22 Nov 2011 11:37:08 +0000 (12:37 +0100)
committerMartin Willi <martin@revosec.ch>
Tue, 20 Mar 2012 16:30:48 +0000 (17:30 +0100)
src/libcharon/encoding/payloads/proposal_substructure.c

index 8ef9931..f0b6041 100644 (file)
@@ -815,6 +815,12 @@ static void set_from_proposal_v1_ike(private_proposal_substructure_t *this,
        transform->add_transform_attribute(transform,
                transform_attribute_create_value(TRANSFORM_ATTRIBUTE_V1,
                                                        TATTR_PH1_AUTH_METHOD, IKEV1_AUTH_PSK));
+       transform->add_transform_attribute(transform,
+               transform_attribute_create_value(TRANSFORM_ATTRIBUTE_V1,
+                                                       TATTR_PH1_LIFE_TYPE, IKEV1_LIFE_TYPE_SECONDS));
+       transform->add_transform_attribute(transform,
+               transform_attribute_create_value(TRANSFORM_ATTRIBUTE_V1,
+                                                       TATTR_PH1_LIFE_DURATION, 10800));
 
        add_transform_substructure(this, transform);
 }
@@ -864,6 +870,12 @@ static void set_from_proposal_v1_esp(private_proposal_substructure_t *this,
        transform->add_transform_attribute(transform,
                transform_attribute_create_value(TRANSFORM_ATTRIBUTE_V1,
                                                        TATTR_PH2_EXT_SEQ_NUMBER, NO_EXT_SEQ_NUMBERS));
+       transform->add_transform_attribute(transform,
+               transform_attribute_create_value(TRANSFORM_ATTRIBUTE_V1,
+                                                       TATTR_PH2_SA_LIFE_TYPE, IKEV1_LIFE_TYPE_SECONDS));
+       transform->add_transform_attribute(transform,
+               transform_attribute_create_value(TRANSFORM_ATTRIBUTE_V1,
+                                                       TATTR_PH2_SA_LIFE_DURATION, 3600));
 
        add_transform_substructure(this, transform);
 }