From: Antonio Quartulli Date: Mon, 14 Mar 2022 13:13:56 +0000 (+0100) Subject: options: drop useless netmask variable X-Git-Tag: v2.6_beta1~255 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07be493796250ad680a4a41c26e19c1938bf37ce;p=thirdparty%2Fopenvpn.git options: drop useless netmask variable netmask is simply used to reflect the value of p[2], therefore it can be dropped and p[2] can directly be used instead. Reported-by: Gert Doering Signed-off-by: Antonio Quartulli Acked-by: Gert Doering Message-Id: <20220314131356.11577-1-a@unstable.cc> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23941.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 7ce0ba613..7d7b8dc1f 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -7282,14 +7282,8 @@ add_option(struct options *options, } else if (streq(p[0], "iroute") && p[1] && !p[3]) { - const char *netmask = NULL; - VERIFY_PERMISSION(OPT_P_INSTANCE); - if (p[2]) - { - netmask = p[2]; - } - option_iroute(options, p[1], netmask, msglevel); + option_iroute(options, p[1], p[2], msglevel); } else if (streq(p[0], "iroute-ipv6") && p[1] && !p[2]) {