aboutsummaryrefslogtreecommitdiff
path: root/etc/rc.network6
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2001-06-19 19:27:51 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2001-06-19 19:27:51 +0000
commit18379cf918fe6e7c85c9320069509caf4210a240 (patch)
tree69737cab08c9d81f4ed281696a57a9deade6f868 /etc/rc.network6
parentca513e5e521c53dc7afce4b293f61a94940d21cc (diff)
downloadsrc-18379cf918fe6e7c85c9320069509caf4210a240.tar.gz
src-18379cf918fe6e7c85c9320069509caf4210a240.zip
Add configuration for a FAITH IPv6-to-IPv4 TCP translator.
To use a FAITH actually, you also need faithd(8) setup. Please consult faithd(8) manpage.
Notes
Notes: svn path=/head/; revision=78475
Diffstat (limited to 'etc/rc.network6')
-rw-r--r--etc/rc.network629
1 files changed, 29 insertions, 0 deletions
diff --git a/etc/rc.network6 b/etc/rc.network6
index a46194fc0b91..aa8d6a2e20cb 100644
--- a/etc/rc.network6
+++ b/etc/rc.network6
@@ -161,6 +161,9 @@ network6_pass1() {
# setup static routes
network6_static_routes_setup
+ # setup faith
+ network6_faith_setup
+
case ${ipv6_gateway_enable} in
[Yy][Ee][Ss])
# ipv6_router
@@ -389,6 +392,32 @@ network6_static_routes_setup() {
esac
}
+network6_faith_setup() {
+ case ${ipv6_faith_prefix} in
+ [Nn][Oo] | '')
+ ;;
+ *)
+ sysctl -w net.inet6.ip6.keepfaith=1
+ ifconfig faith0 up
+ for prefix in ${ipv6_faith_prefix}; do
+ prefixlen=`expr "${prefix}" : ".*/\(.*\)"`
+ case ${prefixlen} in
+ '')
+ prefixlen=96
+ ;;
+ *)
+ prefix=`expr "${prefix}" : \
+ "\(.*\)/${prefixlen}"`
+ ;;
+ esac
+ route add -inet6 ${prefix} -prefixlen ${prefixlen} ::1
+ route change -inet6 ${prefix} -prefixlen ${prefixlen} \
+ -ifp faith0
+ done
+ ;;
+ esac
+}
+
network6_default_interface_setup() {
# Choose IPv6 default interface if it is not clearly specified.
case ${ipv6_default_interface} in