If I use the following procedure, it doesn't properly delete IPv6 addresses tied to an interface... 1. Configure an address in /etc/rc.conf, e.g.: ifconfig_em1_ipv6="inet6 3ffe:501:ffff:100::2 prefixlen 64 2. Run service netif restart em1. 3. Verify address via ifconfig em1 | 3ffe:501:ffff:100::2 . 4. Comment out the ifconfig_* line above. 5. Run service netif restart em1 again. 6. Verify that the address has been deleted from the interface via ifconfig em1 | 3ffe:501:ffff:100::2 .
Responsible Changed From-To: freebsd-bugs->freebsd-rc Over to maintainer(s).
State Changed From-To: open->closed The correct approach is to netif stop, edit the file, then netif start, as with most rc.conf changes.
(In reply to Chris Rees from comment #2) > State Changed > From-To: open->closed > > The correct approach is to netif stop, edit the file, then netif start, > as with most rc.conf changes. This doesn't seem right. 'service netif stop' removes all IPv4 address but not IPv6 addresses. One of these is a bug.
I think this was reported on 10.0-STABLE. I'll need to retest on 11.0-CURRENT.
Just wanted to chime in, and add that service netif restart does not clear IPV6 addresses with 11-CURRENT.
I believe the fix is: --- a/etc/network.subr 2019-05-17 09:48:19.186776000 -0700 +++ b/etc/network.subr 2019-05-17 09:49:38.591154000 -0700 @@ -743,10 +743,6 @@ _ifs="^" _ret=1 - if ! ipv6if $_if; then - return 0 - fi - ipv6_accept_rtadv_down ${_if} && _ret=0 ipv6_prefix_hostid_addr_common ${_if} -alias && _ret=0 ifalias ${_if} inet6 -alias && _ret=0 ipv4_down doesn't check for ipv4 configs before tearing netif down, nor should ipv6.