When attempting to create a Wireguard instance with IPv6 only tunnel address of fdd9:3d6d:5f1:0:169:254:23:34/128, checking the box for "Disable routes" and adding fdd9:3d6d:05f1:0:169:254:23:33 as Gateway I am getting the following error in the log:
/usr/local/opnsense/scripts/Wireguard/wg-service-control.php: The command '/sbin/route -q -n add '-4' 'fdd9:3d6d:05f1:0000:0169:0254:0023:0033' -iface 'wg2'' returned exit code '68', the output was 'route: bad address: fdd9:3d6d:05f1:0000:0169:0254:0023:0033'
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
Describe the bug
When attempting to create a Wireguard instance with IPv6 only tunnel address of
fdd9:3d6d:5f1:0:169:254:23:34/128
, checking the box for "Disable routes" and addingfdd9:3d6d:05f1:0:169:254:23:33
as Gateway I am getting the following error in the log:/usr/local/opnsense/scripts/Wireguard/wg-service-control.php: The command '/sbin/route -q -n add '-4' 'fdd9:3d6d:05f1:0000:0169:0254:0023:0033' -iface 'wg2'' returned exit code '68', the output was 'route: bad address: fdd9:3d6d:05f1:0000:0169:0254:0023:0033'
Expected behavior
This should work by adding
-6
per the logic at https://github.com/opnsense/core/blob/master/src/opnsense/scripts/Wireguard/wg-service-control.php#L133 as it works quite well with IPv4 addresses.Describe alternatives you considered
I'm forced to not use "Disable routes" functionality with IPv6 Wireguard tunnels and instead set "AllowIPs".
Relevant log files
Environment
OPNsense 24.1.9_4 (amd64).