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 <g...@greenie.muc.de>
Signed-off-by: Antonio Quartulli <a...@unstable.cc>
---
 src/openvpn/options.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 7ce0ba61..7d7b8dc1 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])
     {
-- 
2.34.1



_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to