This allows a reconnect in p2p mode and has the side effect of updating
the peer address with the peerid

Signed-off-by: Arne Schwabe <a...@rfc2549.org>
---
 src/openvpn/forward.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c
index 8db4f2ce1..e56028c0c 100644
--- a/src/openvpn/forward.c
+++ b/src/openvpn/forward.c
@@ -150,6 +150,13 @@ check_dco_key_status(struct context *c)
         return;
     }
 
+    /* If the DCO peer id changed, we need to readd the peer */
+    if (c->c2.tls_multi->dco_peer_id != -1
+        && c->c2.tls_multi->peer_id != c->c2.tls_multi->dco_peer_id)
+    {
+        dco_p2p_add_new_peer(c);
+    }
+
     dco_update_keys(&c->c1.tuntap->dco, c->c2.tls_multi);
 }
 
-- 
2.37.0 (Apple Git-136)



_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to