Page MenuHomeDevCentral

Parse IPv6 aliases from FreeBSD rc configuration correctly
ClosedPublic

Authored by dereckson on Sep 12 2026, 21:51.
Tags
None
Referenced Files
F56917230: D4213.diff
Tue, Nov 10, 19:43
F56713685: D4213.diff
Sun, Nov 8, 13:16
F56644769: D4213.id11051.diff
Sat, Nov 7, 23:02
F56488015: D4213.diff
Fri, Nov 6, 12:25
F56190825: D4213.diff
Tue, Nov 3, 17:52
F56073339: D4213.diff
Mon, Nov 2, 14:40
Unknown Object (File)
Sun, Nov 1, 07:04
Unknown Object (File)
Sun, Nov 1, 05:33
Subscribers
None

Details

Summary

After rebooting WindRiver, the IPv6 alias for the IRC bots was not configured.

Use ifconfig_<interface>_alias<number> instead of
<ifconfig_<interface>_ipv6_alias<number>, as /etc/network.subr only looks
for the former when parsing interface aliases:

for alias in `list_vars ifconfig_${_vif}_alias[0-9]\* |
    sort_lite -nk1.$((9+${#_vif}+7))`
do
    eval ifconfig_args=\"\$$alias\"
    # ... logic to check for "inet6" keyword in $ifconfig_args ...
done

Start IPv6 aliases at index 600 to avoid conflicts with IPv4 aliases.

As there is no plan to run a massive NAT gateway or a CDN edge node,
the 600 offset is perfectly safe for the netif templates.

References:

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson created this revision.
WindRiver
$ salt-call --local state.apply roles/core/network/ipv6          
[…]
----------
          ID: /etc/rc.conf.d/netif/ipv6_igb0
    Function: file.managed
      Result: True
     Comment: File /etc/rc.conf.d/netif/ipv6_igb0 updated
     Started: 21:54:49.030119
    Duration: 21.058 ms
     Changes:   
              ----------
              diff:
                  --- 
                  +++ 
                  @@ -14,5 +14,5 @@
                   #   </auto-generated>
                   
                   ifconfig_igb0_ipv6="inet6 2001:bc8:2e84:700::da7a:7001 prefixlen 56"
                  -ifconfig_igb0_ipv6_alias1="inet6 2001:bc8:2e84:700:0:dead:c0de:b07 prefixlen 56"
                  +ifconfig_igb0_alias600="inet6 2001:bc8:2e84:700:0:dead:c0de:b07 prefixlen 56"
[…]
This revision is now accepted and ready to land.Sep 12 2026, 21:56