From cdeba63ca3a9e5c765edecd11745e9e2cc1b945d Mon Sep 17 00:00:00 2001 From: hashiz Date: Thu, 28 Sep 2017 12:16:20 +0900 Subject: [PATCH] Fix '--bind ipv6only' Commit 3d6a4cded2b20fb81 introduced checking for "too many parameters" at option processing, and neglected to take "ipv6only" as possible (and optional) argument to "--bind" into account. Trac: #938 Acked-by: Gert Doering Message-Id: <20170928031620.22331-1-hashiz@meridiani.jp> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15522.html Signed-off-by: Gert Doering --- src/openvpn/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 3a5bccfc2..5f31e7eb0 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -5881,7 +5881,7 @@ add_option(struct options *options, VERIFY_PERMISSION(OPT_P_GENERAL|OPT_P_CONNECTION); options->ce.remote_port = p[1]; } - else if (streq(p[0], "bind") && !p[1]) + else if (streq(p[0], "bind") && !p[2]) { VERIFY_PERMISSION(OPT_P_GENERAL|OPT_P_CONNECTION); options->ce.bind_defined = true; -- 2.47.2