]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix '--bind ipv6only'
authorhashiz <hashiz@meridiani.jp>
Thu, 28 Sep 2017 03:16:20 +0000 (12:16 +0900)
committerGert Doering <gert@greenie.muc.de>
Sat, 30 Sep 2017 10:22:57 +0000 (12:22 +0200)
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 <gert@greenie.muc.de>
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 <gert@greenie.muc.de>
(cherry picked from commit cdeba63ca3a9e5c765edecd11745e9e2cc1b945d)

src/openvpn/options.c

index 8dee5d13d0a5da9bb9b0d1e54632f3dd0b93c99c..4a9c0e779a37ef3faab7129b410687e8b0dfc4ce 100644 (file)
@@ -5902,7 +5902,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;