[Openvpn-devel,v1] options: check permission for --route-ipv6-gateway

Message ID 20261121145406.27273-1-gert@greenie.muc.de
State New
Headers
Series [Openvpn-devel,v1] options: check permission for --route-ipv6-gateway |

Commit Message

Gert Doering Nov. 21, 2026, 2:53 p.m. UTC
  From: Razvan Cojocaru <razvanc@mailbox.org>

Unlike --route-gateway, the handler never called VERIFY_PERMISSION(),
so the option was accepted in any context (<connection>, ccd, inline)
and was missing from option_types_found. Require OPT_P_ROUTE_EXTRAS,
as --route-gateway does.

Change-Id: Ifc72b3677056dd089b8c6cfae4bd07911b6f8407
Signed-off-by: Razvan Cojocaru <razvanc@mailbox.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2228
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2228
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Gert Doering <gert@greenie.muc.de>
  

Patch

diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index e51ece7..2068393 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -5350,6 +5350,7 @@ 
     }
     else if (streq(p[0], "route-ipv6-gateway") && p[1] && !p[2])
     {
+        VERIFY_PERMISSION(OPT_P_ROUTE_EXTRAS);
         if (ipv6_addr_safe(p[1]))
         {
             options->route_ipv6_default_gateway = p[1];