]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Remove push_reply_deferred variable
authorArne Schwabe <arne@rfc2549.org>
Thu, 2 Jul 2020 12:52:24 +0000 (14:52 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 2 Jul 2020 13:20:52 +0000 (15:20 +0200)
The variable has no useful function (anymore?).

There is only one place where this variable was checked

    else if (!c->c2.push_reply_deferred && c->c2.context_auth ==
CAS_SUCCEEDED)

This condition also depends on context_auth == CAS_SUCCEEDED but the only
code path that sets context_auth = CAS_SUCCEEDED also sets
push_reply_deferred = false;

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Lev Stipakov <lstipakov@gmail.com>
Message-Id: <20200702125224.13516-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg20186.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/multi.c
src/openvpn/openvpn.h
src/openvpn/push.c

index 0e9e0db3c26164aa4fa425e5c69c767f1a41560e..e9f021bb26f98e4be5d868e7325dbd2d4ecc1235 100644 (file)
@@ -828,8 +828,6 @@ multi_create_instance(struct multi_context *m, const struct mroute_addr *real)
     mi->did_cid_hash = true;
 #endif
 
-    mi->context.c2.push_reply_deferred = true;
-
 #ifdef ENABLE_ASYNC_PUSH
     mi->context.c2.push_request_received = false;
     mi->inotify_watch = -1;
@@ -2108,11 +2106,6 @@ script_failed:
 
         gc_free(&gc);
     }
-
-    /*
-     * Reply now to client's PUSH_REQUEST query
-     */
-    mi->context.c2.push_reply_deferred = false;
 }
 
 #ifdef ENABLE_ASYNC_PUSH
index 1afc3a920371ca5c250abd7613f5e285208f063e..4609af3e39f91d0041d5f972822d118810469137 100644 (file)
@@ -432,7 +432,6 @@ struct context_2
 #if P2MP
 
     /* --ifconfig endpoints to be pushed to client */
-    bool push_reply_deferred;
 #ifdef ENABLE_ASYNC_PUSH
     bool push_request_received;
 #endif
index 369cd6a4e759a9df14117177b41245802552ad44..56d652a3fbb35ac205bb596ab80a575c8f7bd1f6 100644 (file)
@@ -803,7 +803,7 @@ process_incoming_push_request(struct context *c)
         send_auth_failed(c, client_reason);
         ret = PUSH_MSG_AUTH_FAILURE;
     }
-    else if (!c->c2.push_reply_deferred && c->c2.context_auth == CAS_SUCCEEDED)
+    else if (c->c2.context_auth == CAS_SUCCEEDED)
     {
         time_t now;