Cannot assign dhcrelay CARP IPV6
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- [x] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
- [x] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue
Describe the bug
I am unable to get DHCPv6 relay working if there is only a CARP IPv6 address on the given interface.
If there is an IP address directly on the given interface, it works.
I have no problem with DHCPv4 relay.
To Reproduce
Steps to reproduce the behavior:
- Create CARP VIP (IPv6)
- Try to create DHCPv6 Realy on the interface with IPv6 CARP VIP
- Created DHCPv6 relay failed on start. (dhcrelay_configure_id() found no suitable IP address for opt2(vlan0.69))
Expected behavior
No errors.
Describe alternatives you considered
I looked at the code and found this function: (/usr/local/etc/inc/interfaces.inc line 4094)
foreach (interfaces_addresses($interface, false, $ifconfig_details) as $addr) {
/* XXX consider excluding 'autoconf', but only when it's not in SLAAC mode */
if ($addr['family'] != 'inet6' || $addr['deprecated'] || $addr['detached'] || $addr['tentative'] || $addr['alias']) {
continue;
Here is a filter for IP addresses that are not aliases. When I removed the check on the alias, dhcprelay started normally.
Screenshots
No screenshots.
Relevant log files
opnsense 45373 - [meta sequenceId="108"] /usr/local/sbin/pluginctl: dhcrelay_configure_id() found no suitable IP address for opt2(vlan0.69)
Additional context
No context.
Environment
Software version used and hardware type if relevant, e.g.:
Versions OPNsense 25.10_2-amd64 FreeBSD 14.3-RELEASE-p4 OpenSSL 3.0.18 Licensed until 2026-10-20
Official OPNsense box DEC4240EU.
@fichtner can this condition be altered?
@drobnymichal In the old days a "VIP" was a special entity to select for listening explicitly, but that was not a great concept so it's no longer there. This now seems to revolve around get_interface_ip(v6) functions not being able to cope with ambiguity.
Let me see if I can fix this.
Cheers, Franco
I haven't tested this yet so beware, but I think the approach in 1af287d is what you were looking for.