Skip to content

Commit 2728bf0

Browse files
committed
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 <nahual15@gmail.com>
1 parent b9dff54 commit 2728bf0

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol

protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ return network.registerProtocol('wireguard', {
157157
o.datatype = 'ipaddr';
158158
o.optional = true;
159159

160+
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.'));
161+
o.datatype = 'cidr6';
162+
o.optional = true;
163+
160164
o = s.taboption('general', form.Flag, 'nohostroute', _('No Host Routes'), _('Optional. Do not create host routes to peers.'));
161165
o.optional = true;
162166

@@ -182,9 +186,6 @@ return network.registerProtocol('wireguard', {
182186
return true;
183187
};
184188

185-
o = s.taboption('advanced', form.DynamicList, 'ip6prefix', _('IPv6 routed prefix'), _('This is the prefix routed to you by your provider for use by clients'));
186-
o.datatype = 'cidr6';
187-
188189
// -- peers -----------------------------------------------------------------------
189190

190191
try {

0 commit comments

Comments
 (0)