summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2001-03-18 16:07:21 +0000
committerume <ume@FreeBSD.org>2001-03-18 16:07:21 +0000
commit3d620f4db959d94aa8ba6c0034aae70404b1a508 (patch)
tree15d8c66dec69d546b5716f1cb02f44df3fdd6278 /etc
parent454ff5686f62ac6f0273ae09f0d585fb3e3e7aa9 (diff)
downloadFreeBSD-src-3d620f4db959d94aa8ba6c0034aae70404b1a508.zip
FreeBSD-src-3d620f4db959d94aa8ba6c0034aae70404b1a508.tar.gz
Add `ipv6_ifconfig_IFN_aliasN' directive to allow multiple aliases.
PR: conf/24239
Diffstat (limited to 'etc')
-rw-r--r--etc/defaults/rc.conf3
-rw-r--r--etc/rc.d/network_ipv69
-rw-r--r--etc/rc.network69
3 files changed, 20 insertions, 1 deletions
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
OpenPOWER on IntegriCloud