aboutsummaryrefslogtreecommitdiff
path: root/src/openvpn/push.c
diff options
context:
space:
mode:
authorArne Schwabe2021-03-19 16:31:28 +0100
committerGert Doering2021-03-20 16:25:07 +0100
commitf9d9fe55754dd019bb4c4add180dd780f9102b44 (patch)
tree9832f1f2affb4a5322fee602395acb303b5cdf58 /src/openvpn/push.c
parent45e7d4124c258b8c5b682909b1a0e93ded4cd0cf (diff)
downloadopenvpn-f9d9fe55754dd019bb4c4add180dd780f9102b44.zip
openvpn-f9d9fe55754dd019bb4c4add180dd780f9102b44.tar.gz
Move extract_iv_proto to ssl_util.c/h
This function is used by both NCP and push, so move it to a more proper place. Signed-off-by: Arne Schwabe <arne@rfc2549.org> Acked-by: David Sommerseth <davids@openvpn.net> Message-Id: <20210319153129.8734-1-arne@rfc2549.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21732.html Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/push.c')
-rw-r--r--src/openvpn/push.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/openvpn/push.c b/src/openvpn/push.c
index 320ad73..a651955 100644
--- a/src/openvpn/push.c
+++ b/src/openvpn/push.c
@@ -37,6 +37,7 @@
#include "manage.h"
#include "memdbg.h"
+#include "ssl_util.h"
#if P2MP
@@ -1057,21 +1058,4 @@ remove_iroutes_from_push_route_list(struct options *o)
gc_free(&gc);
}
}
-
-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;
-}
-
#endif /* if P2MP */