From 3d620f4db959d94aa8ba6c0034aae70404b1a508 Mon Sep 17 00:00:00 2001 From: ume Date: Sun, 18 Mar 2001 16:07:21 +0000 Subject: Add `ipv6_ifconfig_IFN_aliasN' directive to allow multiple aliases. PR: conf/24239 --- etc/defaults/rc.conf | 3 ++- etc/rc.d/network_ipv6 | 9 +++++++++ etc/rc.network6 | 9 +++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index cb4b2d4..3865a43 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -232,7 +232,8 @@ ipv6_router_flags="" # Flags to IPv6 routing daemon. # Choose correct prefix value. #ipv6_prefix_ed0="fec0:0000:0000:0001 fec0:0000:0000:0002" # Examples for rtr. #ipv6_prefix_ep0="fec0:0000:0000:0003 fec0:0000:0000:0004" # Examples for rtr. -#ipv6_ifconfig_ed0="fec0:0:0:5::1 prefixlen 64" # Sample alias entry +#ipv6_ifconfig_ed0="fec0:0:0:5::1 prefixlen 64" # Sample manual assign entry +#ipv6_ifconfig_ed0_alias0="fec0:0:0:5::2 prefixlen 64" # Sample alias entry. ipv6_default_interface="" # Default output interface for scoped addrs. # Now this works only for IPv6 link local # multicast addrs. diff --git a/etc/rc.d/network_ipv6 b/etc/rc.d/network_ipv6 index 6b4809f..6b47af8 100644 --- a/etc/rc.d/network_ipv6 +++ b/etc/rc.d/network_ipv6 @@ -302,6 +302,15 @@ network6_interface_setup() { rtsol_interface=no ifconfig $i inet6 ${ipv6_ifconfig} alias fi + alias=0 + while : ; do + eval ipv6_ifconfig=\$ipv6_ifconfig_${i}_alias${alias} + if [ -z "${ipv6_ifconfig}" ]; then + break; + fi + ifconfig $i inet6 ${ipv6_ifconfig} alias + alias=$((${alias} + 1)) + done if [ ${rtsol_available} = yes -a ${rtsol_interface} = yes ] then diff --git a/etc/rc.network6 b/etc/rc.network6 index 6b4809f..6b47af8 100644 --- a/etc/rc.network6 +++ b/etc/rc.network6 @@ -302,6 +302,15 @@ network6_interface_setup() { rtsol_interface=no ifconfig $i inet6 ${ipv6_ifconfig} alias fi + alias=0 + while : ; do + eval ipv6_ifconfig=\$ipv6_ifconfig_${i}_alias${alias} + if [ -z "${ipv6_ifconfig}" ]; then + break; + fi + ifconfig $i inet6 ${ipv6_ifconfig} alias + alias=$((${alias} + 1)) + done if [ ${rtsol_available} = yes -a ${rtsol_interface} = yes ] then -- cgit v1.1