peer-cfg: Set DPD timeout to at least DPD delay
[strongswan.git] / src / libcharon / config / peer_cfg.c
index aa2a39c..8a8c5b7 100644 (file)
@@ -666,6 +666,10 @@ peer_cfg_t *peer_cfg_create(char *name,
        {
                jitter_time = reauth_time;
        }
+       if (dpd && dpd_timeout && dpd > dpd_timeout)
+       {
+               dpd_timeout = dpd;
+       }
 
        INIT(this,
                .public = {