Handling of new lifetime limits added to stroke.
[strongswan.git] / src / charon / plugins / stroke / stroke_config.c
index 5a4dfe2..c76fd16 100644 (file)
@@ -772,6 +772,14 @@ static child_cfg_t *build_child_cfg(private_stroke_config_t *this,
                                msg->add_conn.rekey.ipsec_lifetime,
                                msg->add_conn.rekey.ipsec_lifetime - msg->add_conn.rekey.margin,
                                msg->add_conn.rekey.margin * msg->add_conn.rekey.fuzz / 100);
+       LIFETIME_CFG_SET(lifetime, bytes,
+               msg->add_conn.rekey.life_bytes,
+               msg->add_conn.rekey.life_bytes - msg->add_conn.rekey.margin_bytes,
+               msg->add_conn.rekey.margin_bytes * msg->add_conn.rekey.fuzz / 100);
+       LIFETIME_CFG_SET(lifetime, packets,
+               msg->add_conn.rekey.life_packets,
+               msg->add_conn.rekey.life_packets - msg->add_conn.rekey.margin_packets,
+               msg->add_conn.rekey.margin_packets * msg->add_conn.rekey.fuzz / 100);
        
        child_cfg = child_cfg_create(
                                msg->add_conn.name, lifetime,