From 2728bf0bec9777f54fc89288bf05b794ee8fbfde Mon Sep 17 00:00:00 2001 From: Maksym Vasylchenko Date: Thu, 2 Apr 2026 16:54:34 +0200 Subject: [PATCH] luci-proto-wireguard: add IPv6 routed prefix (ip6prefix) support Add support for IPv6 routed prefix (ip6prefix) in the General Settings tab of WireGuard interfaces, similar to other protocols like 6in4. This allows users to configure Prefix Delegation for WireGuard interfaces through LuCI, enabling proper IPv6 SLAAC delegation to downstream clients. Changes: - Add ip6prefix DynamicList option to general tab - Remove duplicate ip6prefix from advanced tab Signed-off-by: Maksym Vasylchenko --- .../htdocs/luci-static/resources/protocol/wireguard.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js b/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js index 29a9687fca35..4673386c32cc 100644 --- a/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js +++ b/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js @@ -157,6 +157,10 @@ return network.registerProtocol('wireguard', { o.datatype = 'ipaddr'; o.optional = true; + o = s.taboption('general', form.DynamicList, 'ip6prefix', _('IPv6 routed prefix'), _('IPv6 prefix routed to this interface for use by clients. Use this for Prefix Delegation.')); + o.datatype = 'cidr6'; + o.optional = true; + o = s.taboption('general', form.Flag, 'nohostroute', _('No Host Routes'), _('Optional. Do not create host routes to peers.')); o.optional = true; @@ -182,9 +186,6 @@ return network.registerProtocol('wireguard', { return true; }; - o = s.taboption('advanced', form.DynamicList, 'ip6prefix', _('IPv6 routed prefix'), _('This is the prefix routed to you by your provider for use by clients')); - o.datatype = 'cidr6'; - // -- peers ----------------------------------------------------------------------- try {