From: Razvan Cojocaru <[email protected]>

c->mode holds a CM_* value, but do_up() compared it against
MODE_POINT_TO_POINT, an options mode. This only worked because both
are 0.

While at it, drop a duplicate #include "occ.h".

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

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/+/2332
This mail reflects revision 1 of this Change.

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

        
diff --git a/src/openvpn/init.c b/src/openvpn/init.c
index e1052c5..8b64944 100644
--- a/src/openvpn/init.c
+++ b/src/openvpn/init.c
@@ -39,7 +39,6 @@
 #include "otime.h"
 #include "pool.h"
 #include "gremlin.h"
-#include "occ.h"
 #include "pkcs11.h"
 #include "ps.h"
 #include "lladdr.h"
@@ -2363,7 +2362,7 @@
     if (!c->c2.do_up_ran
         || (c->c2.tls_multi && c->c2.tls_multi->multi_state == 
CAS_RECONNECT_PENDING))
     {
-        if (c->mode == MODE_POINT_TO_POINT)
+        if (c->mode == CM_P2P)
         {
             /* ovpn-dco requires adding the peer now, before any option can be 
set,
              * but *after* having parsed the pushed peer-id in 
do_deferred_options()
@@ -2391,7 +2390,7 @@
         }
         else
         {
-            if (c->mode == MODE_POINT_TO_POINT)
+            if (c->mode == CM_P2P)
             {
                 if (!do_deferred_p2p_ncp(c))
                 {


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

Reply via email to