aboutsummaryrefslogtreecommitdiff
path: root/src/openvpn/multi.c
diff options
context:
space:
mode:
authorArne Schwabe2021-03-03 13:38:18 +0100
committerGert Doering2021-03-09 19:41:11 +0100
commit53229047a259b2edb9034802a33fe27636675ff9 (patch)
tree1eeb059cbedc3b15b895eb3f00a6aef45d8aab1e /src/openvpn/multi.c
parent4cf01c8e4381403998341aa32f79f4bf24c7ccb1 (diff)
downloadopenvpn-53229047a259b2edb9034802a33fe27636675ff9.zip
openvpn-53229047a259b2edb9034802a33fe27636675ff9.tar.gz
Implement server side of AUTH_PENDING with extending timeout
Patch V2: eliminate parse_kid function, fix style Patch V3: adding missing parameter in function, this was added by a later patch in the original series Signed-off-by: Arne Schwabe <arne@rfc2549.org> Acked-by: Lev Stipakov <lstipakov@gmail.com> Message-Id: <20210303123818.16012-1-arne@rfc2549.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21596.html Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/multi.c')
-rw-r--r--src/openvpn/multi.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c
index dd71304..ac5d3f5 100644
--- a/src/openvpn/multi.c
+++ b/src/openvpn/multi.c
@@ -1769,28 +1769,6 @@ multi_client_connect_setenv(struct multi_context *m,
}
/**
- * Extracts the IV_PROTO variable and returns its value or 0
- * if it cannot be extracted.
- *
- */
-static unsigned int
-extract_iv_proto(const char *peer_info)
-{
-
- const char *optstr = peer_info ? strstr(peer_info, "IV_PROTO=") : NULL;
- if (optstr)
- {
- int proto = 0;
- int r = sscanf(optstr, "IV_PROTO=%d", &proto);
- if (r == 1 && proto > 0)
- {
- return proto;
- }
- }
- return 0;
-}
-
-/**
* Calculates the options that depend on the client capabilities
* based on local options and available peer info
* - choosen cipher
@@ -3918,14 +3896,15 @@ management_kill_by_cid(void *arg, const unsigned long cid, const char *kill_msg)
static bool
management_client_pending_auth(void *arg,
const unsigned long cid,
- const char *extra)
+ const char *extra,
+ unsigned int timeout)
{
struct multi_context *m = (struct multi_context *) arg;
struct multi_instance *mi = lookup_by_cid(m, cid);
if (mi)
{
/* sends INFO_PRE and AUTH_PENDING messages to client */
- bool ret = send_auth_pending_messages(&mi->context, extra);
+ bool ret = send_auth_pending_messages(&mi->context, extra, timeout);
multi_schedule_context_wakeup(m, mi);
return ret;
}