<div>Hi,</div>
<div> </div>
<div>I found the dpd don't work when setting the remote end with domain name which may change after some time. When the dpd timeout, it only connects to the old IP, but the IP of remote peer has been changed. </div>
<div> </div>
<div>I have searched the code of openswan, I found the remote address stored in 'struct connect' is 'struct ip_addr'. So, when the IP address of remote peer changed, openswan cann't get it from DNS. The solution is restart the connection using 'ipsec auto --replce conn_name' and 'ipsec auto --rereadsecrets conn_name'.
</div>
<div> </div>
<div>I want to know if there is some better solution for this? </div>
<div> </div>
<div>Thanks and regards.</div>
<div> </div>
<div>Liuhy</div>