From: Razvan Cojocaru <[email protected]>

The existing-session branch already rejects a packet whose source
doesn't match ks->remote_addr, and key_state_soft_reset() keeps that
address, so the later check never fails. new_link is always false in
that branch.

Change-Id: I74eca236465190ab55db289b98e432757c61a4a3
Signed-off-by: Razvan Cojocaru <[email protected]>
Acked-by: Lev Stipakov <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2240
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2240
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Lev Stipakov <[email protected]>

        
diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c
index d5ae13d..e4a39b2 100644
--- a/src/openvpn/ssl.c
+++ b/src/openvpn/ssl.c
@@ -4003,7 +4003,7 @@
         /*
          * Verify remote IP address
          */
-        if (!new_link && !link_socket_actual_match(&ks->remote_addr, from))
+        if (!link_socket_actual_match(&ks->remote_addr, from))
         {
             msg(D_TLS_ERRORS, "TLS Error: Received control packet from 
unexpected IP addr: %s",
                 print_link_socket_actual(from, &gc));
@@ -4105,13 +4105,6 @@
         ks->remote_addr = *from;
         ++multi->n_sessions;
     }
-    else if (!link_socket_actual_match(&ks->remote_addr, from))
-    {
-        msg(D_TLS_ERRORS,
-            "TLS Error: Existing session control channel packet from unknown 
IP address: %s",
-            print_link_socket_actual(from, &gc));
-        goto error;
-    }
 
     /*
      * Should we do a retransmit of all unacknowledged packets in


_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to