Browse code

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 <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>

hashiz authored on 2017/09/28 12:16:20
Showing 1 changed files
... ...
@@ -5881,7 +5881,7 @@ add_option(struct options *options,
5881 5881
         VERIFY_PERMISSION(OPT_P_GENERAL|OPT_P_CONNECTION);
5882 5882
         options->ce.remote_port = p[1];
5883 5883
     }
5884
-    else if (streq(p[0], "bind") && !p[1])
5884
+    else if (streq(p[0], "bind") && !p[2])
5885 5885
     {
5886 5886
         VERIFY_PERMISSION(OPT_P_GENERAL|OPT_P_CONNECTION);
5887 5887
         options->ce.bind_defined = true;