summaryrefslogtreecommitdiff
path: root/net/hf6to4/files
diff options
context:
space:
mode:
authorhubertf <hubertf>2003-09-16 13:05:55 +0000
committerhubertf <hubertf>2003-09-16 13:05:55 +0000
commit8ece4846b220eb677e44f8dd6e9dd00f4ae0541a (patch)
tree9d96b1c21cf4b6d25845ff8cfeb19cfb8e757367 /net/hf6to4/files
parente9b1b448b23ce6049dc086a07e685ae607fb2928 (diff)
downloadpkgsrc-8ece4846b220eb677e44f8dd6e9dd00f4ae0541a.tar.gz
Update to ht6to4-1.1. Changes:
* also remove 6to4 addresses from internal interface, if set * doc updates Inspired by patch sent by Markus W Kilbinger <kilbi@rad.rwth-aachen.de> in private mail.
Diffstat (limited to 'net/hf6to4/files')
-rwxr-xr-xnet/hf6to4/files/hf6to422
-rw-r--r--net/hf6to4/files/hf6to4.88
-rw-r--r--net/hf6to4/files/hf6to4.conf2
3 files changed, 28 insertions, 4 deletions
diff --git a/net/hf6to4/files/hf6to4 b/net/hf6to4/files/hf6to4
index de79d05f99f..011b8276076 100755
--- a/net/hf6to4/files/hf6to4
+++ b/net/hf6to4/files/hf6to4
@@ -171,6 +171,22 @@ then
run ifconfig stf0 inet6 -alias $adr
done
+ # remove v6 addresses from internal interface
+ if [ "$in_if" != "" ]
+ then
+ adrs=`ifconfig $in_if inet6 \
+ | grep inet6 \
+ | grep "2002:.*:$v6_innernet:$hostbits6" \
+ | sed -e 's/inet6//' \
+ -e 's/prefix.*//g' \
+ -e 's/^[ ]*//' \
+ -e 's/[ ]*\$//'`
+ for adr in $adrs
+ do
+ run ifconfig $in_if inet6 -alias $adr
+ done
+ fi
+
# remove default route:
run route delete -inet6 default
fi
@@ -180,7 +196,7 @@ fi
if [ "$1" = "start" ]
then
run ifconfig stf0 inet6 $localadr6:$hostbits6 prefixlen $v6_prefixlen alias
- run route add -inet6 default $remoteadr6
+ run route add -inet6 default $remoteadr6 >/dev/null
if [ "$in_if" != "" ]
then
run ifconfig $in_if inet6 $prefix:$v6_innernet:$hostbits6
@@ -188,6 +204,8 @@ then
fi
# rtadvd-stop:
+#
+# XXX maybe better do this via rc.conf & rc.d/rtadvd?
if [ "$1" = "rtadvd-stop" -o "$1" = "stop-rtadvd" ]
then
if [ -f "/var/run/rtadvd.pid" ]
@@ -201,6 +219,8 @@ then
fi
# rtadvd-start:
+#
+# XXX maybe better do this via rc.conf & rc.d/rtadvd?
if [ "$1" = "rtadvd-start" -o "$1" = "start-rtadvd" ]
then
if [ -f "/var/run/rtadvd.pid" ]
diff --git a/net/hf6to4/files/hf6to4.8 b/net/hf6to4/files/hf6to4.8
index 2d1f02381e3..b35892f4d26 100644
--- a/net/hf6to4/files/hf6to4.8
+++ b/net/hf6to4/files/hf6to4.8
@@ -1,4 +1,4 @@
-.\" $NetBSD: hf6to4.8,v 1.1.1.1 2003/08/23 13:30:35 hubertf Exp $
+.\" $NetBSD: hf6to4.8,v 1.2 2003/09/16 13:05:58 hubertf Exp $
.Dd August 23, 2003
.Dt hf6to4 8
.Os
@@ -56,7 +56,9 @@ network interface is assigned an address.
.It Sy stop
Stops 6to4 IPv6. All addresses are removed from the
.Xr stf 4
-device, and the default route is removed.
+device, and the default route is removed. If
+.Sy in_if
+is set, the 6to4 adresses are removed from that interface too.
.It Sy rtadvd-start
Starts router advertizement and IPv6 packet forwarding,
turning the machine into a IPv6 router.
@@ -206,3 +208,5 @@ Hubert Feyrer <hubert@feyrer.de>.
On systems running past-1.5, the
.Dq ifconfig stf0 create
should be run automatically.
+.Pp
+Might be good to use /etc/rc.d/rtadvd for rtadvd handling.
diff --git a/net/hf6to4/files/hf6to4.conf b/net/hf6to4/files/hf6to4.conf
index 70cc7fbd1eb..0eda7c8ae76 100644
--- a/net/hf6to4/files/hf6to4.conf
+++ b/net/hf6to4/files/hf6to4.conf
@@ -21,7 +21,7 @@ hostbits6=":1" # should be determined via MAC of $in_if
#peer="6to4.ipv6.fh-regensburg.de" # Germany, Europe
#peer="6to4-anycast" # use RFC 3068 magic values
#peer="asterix.ipv6.bt.com" # Great Britain, Europe
-#$peer="6to4.kfu.com" # USA, West coast
+#peer="6to4.kfu.com" # USA, West coast
#peer="6to4.ipv6.microsoft.com" # USA, West coast
#peer="ipv6-router.cisco.com" # USA, West coast; register at http://www.cisco.com/ipv6/