pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc * Copyright maintenance



details:   https://anonhg.NetBSD.org/pkgsrc/rev/99456020b2c2
branches:  trunk
changeset: 494804:99456020b2c2
user:      hubertf <hubertf%pkgsrc.org@localhost>
date:      Mon May 30 22:49:42 2005 +0000

description:
* Copyright maintenance
 * make "stf-start" and "stf-stop" aliases to "start" and "stop"
 * don't use RFC 1918 or 3927 IPs as outer address

Inspired by OpenDarwin/MacOS X's ip6config (== old perl version of hf6to4! :-).

diffstat:

 doc/CHANGES                  |    3 +-
 net/hf6to4/Makefile          |    4 +-
 net/hf6to4/files/hf6to4      |   49 ++++++++++++++--
 net/hf6to4/files/hf6to4.8    |   60 ++++++++++++++++++--
 net/hf6to4/files/hf6to4.html |  126 +++++++++++++++++++++++++-----------------
 5 files changed, 176 insertions(+), 66 deletions(-)

diffs (truncated from 470 to 300 lines):

diff -r 8f206944e609 -r 99456020b2c2 doc/CHANGES
--- a/doc/CHANGES       Mon May 30 21:09:44 2005 +0000
+++ b/doc/CHANGES       Mon May 30 22:49:42 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.10254 2005/05/30 20:23:37 bouyer Exp $
+$NetBSD: CHANGES,v 1.10255 2005/05/30 22:49:42 hubertf Exp $
 
 Changes to the packages collection and infrastructure in 2005:
        
@@ -2666,3 +2666,4 @@
        Updated multimedia/libmatroska to 0.7.7 [salo 2005-05-30]
        Updated net/tinc to 1.0.4 [wiz 2005-05-30]
        Updated cad/eagle to 4.14 [bouyer 2005-05-30]
+       Updated net/hf6to4 to 1.3 [hubertf 2005-05-31]
diff -r 8f206944e609 -r 99456020b2c2 net/hf6to4/Makefile
--- a/net/hf6to4/Makefile       Mon May 30 21:09:44 2005 +0000
+++ b/net/hf6to4/Makefile       Mon May 30 22:49:42 2005 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.5 2005/03/15 13:26:07 tv Exp $
+# $NetBSD: Makefile,v 1.6 2005/05/30 22:49:42 hubertf Exp $
 #
 
-DISTNAME=              hf6to4-1.2
+DISTNAME=              hf6to4-1.3
 CATEGORIES=            net
 MASTER_SITES=          # empty
 DISTFILES=             # empty
diff -r 8f206944e609 -r 99456020b2c2 net/hf6to4/files/hf6to4
--- a/net/hf6to4/files/hf6to4   Mon May 30 21:09:44 2005 +0000
+++ b/net/hf6to4/files/hf6to4   Mon May 30 22:49:42 2005 +0000
@@ -1,8 +1,39 @@
 #!/bin/sh
 #
-# hf6to4 - Setup 6to4 IPv6, for NetBSD (and maybe others)
+# $NetBSD: hf6to4,v 1.4 2005/05/30 22:49:43 hubertf Exp $
+#
+# Copyright (c) 2000-2005 Hubert Feyrer <hubert%feyrer.de@localhost>
+# All rights reserved.
 #
-# (c) Copyright 2000, 2003 Hubert Feyrer <hubert%feyrer.de@localhost>
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. All advertising materials mentioning features or use of this software
+#    must display the following acknowledgement:
+#      This product includes software developed by Hubert Feyrer
+#      for the NetBSD Project.
+# 4. The name of the author may not be used to endorse or promote products
+#    derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+#
+# hf6to4 - Setup 6to4 IPv6, for NetBSD (and others)
 #
 
 etcdir="/usr/pkg/etc";
@@ -37,7 +68,7 @@
 ###########################################################################
 usage()
 {
-    echo "Usage: $0 [-n] [-v] {start | stop | rtadvd-start | rtadvd-stop}";
+    echo "Usage: $0 [-n] [-v] {stf-start | stf-stop | rtadvd-start | rtadvd-stop}";
 }
 
 ###########################################################################
@@ -95,12 +126,18 @@
 
 
 #
-# Figure out IP#s etc.
+# Figure out IP#s etc. - ignore RFC 1918 and 3927 IPs
 #
 localadr4=`ifconfig $out_if inet \
            | grep inet \
           | sed 's/^.*inet *//' \
           | sed 's/ .*$//' \
+          | grep -v '^192\.168\.' \
+          | grep -v '^10\.' \
+          | grep -v '^172\.1[6-9]\.' \
+          | grep -v '^172\.2[0-9]\.' \
+          | grep -v '^172\.3[01]\.' \
+          | grep -v '^169\.254\.' \
           | head -1`
 
 l4c=`echo $localadr4 | sed 's,\., ,g'`
@@ -156,7 +193,7 @@
 #
 
 # stop:
-if [ "$1" = "stop" ]
+if [ "$1" = "stf-stop" -o "$1" = "stop" ]
 then
        run ifconfig stf0 down
        
@@ -194,7 +231,7 @@
 
 
 # start:
-if [ "$1" = "start" ]
+if [ "$1" = "stf-start" -o "$1" = "start" ]
 then
        run ifconfig stf0 inet6 $localadr6:$hostbits6 prefixlen $v6_prefixlen alias
        run route add -inet6 default $remoteadr6 >/dev/null
diff -r 8f206944e609 -r 99456020b2c2 net/hf6to4/files/hf6to4.8
--- a/net/hf6to4/files/hf6to4.8 Mon May 30 21:09:44 2005 +0000
+++ b/net/hf6to4/files/hf6to4.8 Mon May 30 22:49:42 2005 +0000
@@ -1,5 +1,35 @@
-.\"     $NetBSD: hf6to4.8,v 1.3 2004/01/31 23:56:47 snj Exp $
-.Dd August 23, 2003
+.\"     $NetBSD: hf6to4.8,v 1.4 2005/05/30 22:49:43 hubertf Exp $
+.\"
+.\" Copyright (c) 2000-2005 Hubert Feyrer <hubert%feyrer.de@localhost>.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"      This product includes software developed by Hubert Feyrer for
+.\"      the NetBSD Project.
+.\" 4. The name of the author may not be used to endorse or promote products
+.\"    derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd May 31, 2005
 .Dt hf6to4 8
 .Os
 .Sh NAME
@@ -48,12 +78,18 @@
 Possible commands are:
 .Bl -tag -width rtadvd-start
 .It Sy start
+Same as
+.Sy stf-start .
+.It Sy stop
+Same as
+.Sy stf-stop .
+.It Sy stf-start
 Configure 6to4 IPv6. The
 .Xr stf 4
 interface is configured, and a default route to a remote 6to4
 gateway is established. In addition, the internal
 network interface is assigned an address.
-.It Sy stop
+.It Sy stf-stop
 Stops 6to4 IPv6. All addresses are removed from the
 .Xr stf 4
 device, and the default route is removed. If
@@ -181,14 +217,17 @@
 when a connection is made. For this, put the following into
 .Pa /etc/ppp/ip-up :
 .Bd -literal -offset
-( /usr/pkg/sbin/hf6to4 stop
-  /usr/pkg/sbin/hf6to4 start ) &
+( /usr/pkg/sbin/hf6to4 stf-stop
+  /usr/pkg/sbin/hf6to4 stf-start
+  /usr/pkg/sbin/hf6to4 rtadvd-stop
+  /usr/pkg/sbin/hf6to4 rtadvd-start ) &
 .Ed
 .Pp
 To shut down properly, put this into
 .Pa /etc/ppp/ip-down :
 .Bd -literal -offset
-/usr/pkg/sbin/hf6to4 stop
+/usr/pkg/sbin/hf6to4 stf-stop
+/usr/pkg/sbin/hf6to4 rtadvd-stop
 .Ed
 .Sh SEE ALSO
 .Xr stf 4 ,
@@ -204,6 +243,15 @@
 .Nm
 utility and manpage were written by
 Hubert Feyrer <hubert%feyrer.de@localhost>.
+.Pp
+The utility was initially written in perl and called
+.Dq 6to4
+but later rewritten as shell script and renamed to a name different
+than the protocol it configures to emphasize the difference
+between the protocol (6to4) and the implementation (hf6to4).
+.Pp
+The older (perl) version is also shipped by Apple with versions
+10.3 and 10.4 (and probably newer) of their MacOS X operating system. 
 .Sh BUGS
 On systems running past-1.5, the
 .Dq ifconfig stf0 create
diff -r 8f206944e609 -r 99456020b2c2 net/hf6to4/files/hf6to4.html
--- a/net/hf6to4/files/hf6to4.html      Mon May 30 21:09:44 2005 +0000
+++ b/net/hf6to4/files/hf6to4.html      Mon May 30 22:49:42 2005 +0000
@@ -1,35 +1,35 @@
 <html>
 <head>
-     <title>
-           August 23, 2003 hf6to4 8
+        <title>
+                 May 31, 2005 hf6to4 8
 
-     </title>
+        </title>
         <style type="text/css">
         <!--
-          body { margin-left:4%; }
-          H1, H2, H3, H4, H5 {
-               color: maroon; padding: 4pt; margin-left: -4%;
-               border: solid; border-width: thin; width: 100%;
-               background: rgb(204,204,255)
-          }
+                body { margin-left:4%; }
+                H1, H2, H3, H4, H5 {
+                        color: maroon; padding: 4pt; margin-left: -4%;
+                        border: solid; border-width: thin; width: 100%;
+                        background: rgb(204,204,255)
+                }
         -->
         </style>
 </head>
 <body bgcolor="#FFFFFF" text="#000000">
-     <h3>
-     NAME
-     </h3>
+        <h3>
+        NAME
+        </h3>
 <b>hf6to4</b>
 - setup automatic 6to4 IPv6 tunnelling
-     <h3>
-     SYNOPSIS
-     </h3>
+        <h3>
+        SYNOPSIS
+        </h3>
 <b>hf6to4</b>
 [<b>-</b><b></b><b>vn</b>]
 <i></i><i>command</i>
-     <h3>
-     DESCRIPTION
-     </h3>
+        <h3>
+        DESCRIPTION
+        </h3>
 The
 <b>hf6to4</b>
 script can be used to setup IPv6 on your home machine and
@@ -42,17 +42,17 @@
 packets are accepted from all v4-hosts. See
 <a href="../html4/stf.html">stf(4)</a>
 for security discussion.
-     <p>
+        <p>
 From your (single) IPv4 address, you get a whole IPv6 /48 network,
 which allows you to split your network in 2^16 subnets, with 2^64
 hosts each. You need to setup routing for your internal network
 properly, help is provided for setting up the border router here.
-     <p>
+        <p>
 This script takes the burden to calculate your IPv6 address from
 existing IPv4 address and runs the commands to setup (and tear down)
 automatic 6to4 IPv6 tunnelling. In a separate step, router
 advertisement for the inside network can be started and stopped.
-     <p>
+        <p>
 Possible options are:
 <dl compact>
 <p><dt><b>-</b><b></b><b>n</b><dd>
@@ -64,19 +64,27 @@
 <p><dt><b>-</b><b></b><b>h</b><dd>
 Show usage.
 </dl>
-     <p>



Home | Main Index | Thread Index | Old Index