The following error message is logged when deleting ::1/128 from lo0 without explicitly adding it to the interface:
in6_purgeaddr: err=65, destination address delete failed
This message seems to be issued at /usr/src/sys/netinet6/in6.c, line 1311 (12.1-RELEASE).
It only happens with the implicitly generated ::1/128 address on the loopback interface. If ::1/128 has been assigned explicitly (see examples below), no message is logged. The issue applies to the host system (running the 12.1-RELEASE generic kernel) as well as vnet jails. Here is how to reproduce the issue:
On the host system:
ifconfig lo0 inet6 ::1/128 delete # after boot, error logged
ifconfig lo0 inet6 ::1/128
ifconfig lo0 inet6 ::1/128 delete # no error logged
In a jail:
# Reproducing the error
jail -c -n failjail vnet persist
jexec failjail ifconfig lo0 up
jexec failjail ifconfig lo0 inet6 ::1/128 delete # error logged
jail -r failjail
# Avoiding the error
jail -c -n okjail vnet persist
jexec okjail ifconfig lo0 inet6 ::1/128 # don't use 'up'
jexec okjail ifconfig lo0 inet6 ::1/128 delete # no error logged
jail -r okjail
(In reply to Markus Stoff from comment #0)
The issue can be mitigated by setting ::1/128 on the loopback interface via /etc/rc.conf:
sysrc ifconfig_lo0_ipv6="inet6 ::1/128"
Just for my curiosity, why do you need to remove ::1 on lo0?
The current FreeBSD does not support well removing ::1 when IPv6
is enabled in the kernel.
(In reply to Hiroki Sato from comment #2)
I'm not doing this intentionally. The above is only a dumbed down way to reproduce the issue.
I'm using exec.stop = "/bin/sh /etc/rc.shutdown" with my jails, and this is where the message is being triggered.