src icon indicating copy to clipboard operation
src copied to clipboard

Changing the netmask of a Virtual IP does not apply change

Open CRCinAU opened this issue 1 year ago • 3 comments

Consider the following configuration: image

This results in the following IP addresses set on the LAN interface:

        inet6 fe80::1%vtnet0 prefixlen 64 scopeid 0x1
        inet6 fe80::53%vtnet0 prefixlen 64 scopeid 0x1

If you change the subnet mask, and then hit Apply, nothing on the system changes: image

The system is still configured as:

        inet6 fe80::1%vtnet0 prefixlen 64 scopeid 0x1
        inet6 fe80::53%vtnet0 prefixlen 64 scopeid 0x1

Removing and adding the aliased addresses again works as expected.

CRCinAU avatar Jul 24 '24 15:07 CRCinAU

Thank you for creating an issue. Since the ticket doesn't seem to be using one of our templates, we're marking this issue as low priority until further notice.

For more information about the policies for this repository, please read https://github.com/opnsense/core/blob/master/CONTRIBUTING.md for further details.

The easiest option to gain traction is to close this ticket and open a new one using one of our templates.

OPNsense-bot avatar Jul 24 '24 16:07 OPNsense-bot

for some reason ifconfig doesn't accept changes here, example output when changing 128 to 120 (or anything else):

# /sbin/ifconfig vtnet2 inet6 'ffff:ffff:fffff::4f31' prefixlen '120' alias vhid '3'
ifconfig: ioctl (SIOCAIFADDR): Invalid argument

AdSchellevis avatar Jul 25 '24 11:07 AdSchellevis

CC @gmshake maybe you are interested in this problem report

fichtner avatar Mar 21 '25 07:03 fichtner

Closing stale upstream ticket.

fichtner avatar Sep 11 '25 06:09 fichtner

CC @gmshake maybe you are interested in this problem report

Sorry, busy days...

gmshake avatar Sep 11 '25 08:09 gmshake

No worries, I understand. :)

fichtner avatar Sep 11 '25 08:09 fichtner

I can confirm that the changing netmask / prefix len of IPv4 address with alias command works as expected. But change IPv6 address ' prefex len the ifconfig(8) response with false positive .

# ifconfig cxl1 inet6 2001:db8::12ab/64 alias
# ifconfig cxl1 inet6 | grep 2001
	inet6 2001:db8::12ab prefixlen 64
# ifconfig cxl1 inet6 2001:db8::12ab/80 alias && ifconfig cxl1 inet6 | grep 2001
	inet6 2001:db8::12ab prefixlen 64

It appears to be a genuine bug. The second alias command should either fail or succeed, but not left nothing changed.

gmshake avatar Sep 11 '25 08:09 gmshake