diff -urNp
inet6-apps-0.26.orig/GNUmakefile inet6-apps-0.26/GNUmakefile
--- inet6-apps-0.26.orig/GNUmakefile Tue May 27 18:23:09 1997
+++ inet6-apps-0.26/GNUmakefile Mon Nov 17 16:17:46 1997
@@ -38,3 +38,5 @@ install: makeinstdirs
@cat GNUmakefile.inc | sed 's:^INSTALLED=0$$:INSTALLED=1:' | sed
's:@CONFIG_DIR@:$(DESTDIR)$(LIBDIR)/:g' > $(DESTDIR)$(LIBDIR)/GNUmakefile.inc
@chmod 644 $(DESTDIR)$(LIBDIR)/GNUmakefile.inc
@for i in $(SUBDIRS); do if [ -d $$i ]; then ( cd $$i; $(MAKE)
$@); fi; done
+ @install
-c -m 644 inetd/inetd.conf.sample /usr/inet6/etc
+
diff -urNp
inet6-apps-0.26.orig/GNUmakefile.orig inet6-apps-0.26/GNUmakefile.orig
--- inet6-apps-0.26.orig/GNUmakefile.orig
Thu Jan 1 02:00:00 1970
+++ inet6-apps-0.26/GNUmakefile.orig
Tue May 27 18:23:09 1997
@@ -0,0 +1,40
@@
+# %%% copyright-cmetz-96
+# This software
is Copyright 1996-1997 by Craig Metz, All Rights Reserved.
+# The Inner
Net License Version 2 applies to this software.
+# You should
have received a copy of the license with this software. If
+# you didn't
get a copy, you may request one from <license@inner.net>.
+#
+
+DOTS=./
+include
GNUmakefile.inc
+
+SUBDIRS=support
etc finger fingerd ftp ftpd include inetd man misc ping tftp
+
+all clean:
+ @for i
in $(SUBDIRS); do if [ -d $$i ]; then ( cd $$i; $(MAKE) $@); fi;
done
+
+makeinstdirs:
+ @-mkdir
-p $(DESTDIR)
+ @-mkdir
-p $(DESTDIR)$(LIBEXECDIR)
+ @-mkdir
-p $(DESTDIR)$(USR_BINDIR)
+ @-mkdir
-p $(DESTDIR)$(USR_SBINDIR)
+ @-mkdir
-p $(DESTDIR)$(SBINDIR)
+ @-mkdir
-p $(DESTDIR)$(SCRIPTDIR)
+ @-mkdir
-p $(DESTDIR)$(INCDIR)
+ @-mkdir
-p $(DESTDIR)$(LIBDIR)
+ @-mkdir
-p $(DESTDIR)$(MANDIR)
+ @-mkdir
-p $(DESTDIR)$(MANDIR)/man1
+ @-mkdir
-p $(DESTDIR)$(MANDIR)/man3
+ @-mkdir
-p $(DESTDIR)$(MANDIR)/man4
+ @-mkdir
-p $(DESTDIR)$(MANDIR)/man5
+ @-mkdir
-p $(DESTDIR)$(MANDIR)/man8
+
+install:
makeinstdirs
+ @echo "GNUmakefile.config
-> $(DESTDIR)$(LIBDIR)/GNUmakefile.config"
+ @install
-c -m 644 GNUmakefile.config $(DESTDIR)$(LIBDIR)
+ @echo "GNUmakefile.prog.tmpl
-> $(DESTDIR)$(LIBDIR)/GNUmakefile.prog.tmpl"
+ @install
-c -m 644 GNUmakefile.prog.tmpl $(DESTDIR)$(LIBDIR)
+ @echo "GNUmakefile.inc
-> $(DESTDIR)$(LIBDIR)/GNUmakefile.inc"
+ @cat GNUmakefile.inc
| sed 's:^INSTALLED=0$$:INSTALLED=1:' | sed 's:@CONFIG_DIR@:$(DESTDIR)$(LIBDIR)/:g'
> $(DESTDIR)$(LIBDIR)/GNUmakefile.inc
+ @chmod
644 $(DESTDIR)$(LIBDIR)/GNUmakefile.inc
+ @for i
in $(SUBDIRS); do if [ -d $$i ]; then ( cd $$i; $(MAKE) $@); fi;
done
diff -urNp
inet6-apps-0.26.orig/etc/GNUmakefile inet6-apps-0.26/etc/GNUmakefile
--- inet6-apps-0.26.orig/etc/GNUmakefile
Tue May 27 18:18:25 1997
+++ inet6-apps-0.26/etc/GNUmakefile
Mon Nov 17 16:17:46 1997
@@ -12,6
+12,8 @@ all clean:
@true
install:
- @echo "protocols
-> /etc/protocols"
- @install
-c -m 644 protocols /etc
- @if ! grep
::1 /etc/hosts >/dev/null 2>/dev/null; then echo "hosts
->> /etc/hosts"; mv -f /etc/hosts /etc/hosts.old; cat
/etc/hosts.old hosts >/etc/hosts; chmod 644 /etc/hosts; fi
+ @echo "protocols
-> /usr/inet6/etc/protocols"
+ @install
-c -m 644 protocols /usr/inet6/etc
+# @if !
grep ::1 /etc/hosts >/dev/null 2>/dev/null; then echo "hosts
->> /etc/hosts"; mv -f /etc/hosts /etc/hosts.old; cat
/etc/hosts.old hosts >/etc/hosts; chmod 644 /etc/hosts; fi
+# the above
is not what WE want just install in /usr/inet6/etc
+ @install
-c -m 644 hosts /usr/inet6/etc
A.4
Αρχείο net-tools-1.432b.patch
diff -urNp
net-tools.orig/Makefile net-tools/Makefile
--- net-tools.orig/Makefile Sun Sep 21 20:31:58 1997
+++ net-tools/Makefile Fri Nov 14 21:35:55 1997
@@ -67,7 +67,7 @@
#
# set the
base of the Installation
-# BASEDIR = /mnt
+BASEDIR = /usr/inet6
#
# DON'T CHANGE ANY of the NLS-Support definitions, it's disabled
@@ -86,9 +86,9 @@ PROGS = ifconfig hostname arp netstat ro
# Compiler
and Linker Options
# You may need to uncomment and edit these if you are using libc5.
-COPTS = -O2 -Wall -g # -I/usr/inet6/include
+COPTS = -O2 -Wall -g -I/usr/inet6/include
LOPTS =
-RESLIB = # -L/usr/inet6/lib -linet6
+RESLIB = -L/usr/inet6/lib -linet6
# -------- end of user definitions --------
@@ -197,6
+197,7 @@ installbin:
install -o root -g root -m 0755 rarp ${BASEDIR}/sbin
install -o root -g root -m 0755 route ${BASEDIR}/sbin
install -o root -g root -m 0755 hostname ${BASEDIR}/bin
+ install -o root -g root -m 0755 ${NET-LIB} ${BASEDIR}/lib
ln -fs hostname $(BASEDIR)/bin/dnsdomainname
ln -fs hostname $(BASEDIR)/bin/ypdomainname
ln -fs hostname $(BASEDIR)/bin/nisdomainname
@@ -213,16 +214,16 @@ savebin:
[ -f
$$i ] && cp -f $$i $$i.old ; done ; echo Saved.
installdata:
- install
-o root -g root -m 0644 man/${DEF_LANG}/arp.8 ${BASEDIR}/usr/man/man8
- install
-o root -g root -m 0644 man/${DEF_LANG}/ifconfig.8 ${BASEDIR}/usr/man/man8
- install
-o root -g root -m 0644 man/${DEF_LANG}/netstat.8 ${BASEDIR}/usr/man/man8
- install
-o root -g root -m 0644 man/${DEF_LANG}/rarp.8 ${BASEDIR}/usr/man/man8
- install
-o root -g root -m 0644 man/${DEF_LANG}/route.8 ${BASEDIR}/usr/man/man8
- install
-o root -g root -m 0644 man/${DEF_LANG}/hostname.1 ${BASEDIR}/usr/man/man1
- install
-o root -g root -m 0644 man/${DEF_LANG}/dnsdomainname.1 ${BASEDIR}/usr/man/man1
- install
-o root -g root -m 0644 man/${DEF_LANG}/ypdomainname.1 ${BASEDIR}/usr/man/man1
- install
-o root -g root -m 0644 man/${DEF_LANG}/nisdomainname.1 ${BASEDIR}/usr/man/man1
- install
-o root -g root -m 0644 man/${DEF_LANG}/domainname.1 ${BASEDIR}/usr/man/man1
+ install
-o root -g root -m 0644 man/${DEF_LANG}/arp.8 ${BASEDIR}/man/man8
+ install
-o root -g root -m 0644 man/${DEF_LANG}/ifconfig.8 ${BASEDIR}/man/man8
+ install
-o root -g root -m 0644 man/${DEF_LANG}/netstat.8 ${BASEDIR}/man/man8
+ install
-o root -g root -m 0644 man/${DEF_LANG}/rarp.8 ${BASEDIR}/man/man8
+ install
-o root -g root -m 0644 man/${DEF_LANG}/route.8 ${BASEDIR}/man/man8
+ install
-o root -g root -m 0644 man/${DEF_LANG}/hostname.1 ${BASEDIR}/man/man1
+ install
-o root -g root -m 0644 man/${DEF_LANG}/dnsdomainname.1 ${BASEDIR}/man/man1
+ install
-o root -g root -m 0644 man/${DEF_LANG}/ypdomainname.1 ${BASEDIR}/man/man1
+ install
-o root -g root -m 0644 man/${DEF_LANG}/nisdomainname.1 ${BASEDIR}/man/man1
+ install
-o root -g root -m 0644 man/${DEF_LANG}/domainname.1 ${BASEDIR}/man/man1
#ifneq ($(USE_NLS),
"")
# if [ "${DEF_LANG}"
!= "en_US.88591" ]; then \
# install
-o root -g root -m 0755 -d ${BASEDIR}/usr/lib/locale/${DEF_LANG}
;\
diff -urNp
net-tools.orig/config.h net-tools/config.h
--- net-tools.orig/config.h
Thu Jan 1 02:00:00 1970
+++ net-tools/config.h
Fri Nov 14 21:36:03 1997
@@ -0,0 +1,40
@@
+/*
+* config.h
Automatically generated configuration includefile
+*
+* NET-TOOLS
A collection of programs that form the base set of the
+* NET-3
Networking Distribution for the LINUX operating
+* system.
+*
+* DO NOT
EDIT DIRECTLY
+*
+* Version:
Generated from "config.in 1.04 (96-04-24)"
+*/
+
+/*
+ *
+ * Protocol
Families.
+ *
+ */
+#define
HAVE_AFUNIX 1
+#define
HAVE_AFINET 1
+#define
HAVE_AFINET6 1
+#define
HAVE_AFIPX 1
+#define
HAVE_AFATALK 1
+#define
HAVE_AFAX25 1
+#define
HAVE_AFNETROM 1
+
+/*
+ *
+ * Device
Hardware types.
+ *
+ */
+#define
HAVE_HWETHER 1
+#define
HAVE_HWARC 1
+#define
HAVE_HWSLIP 1
+#define
HAVE_HWPPP 1
+#define
HAVE_HWTUNNEL 1
+#define
HAVE_HWTR 1
+#define
HAVE_HWAX25 1
+#define
HAVE_HWNETROM 1
+#define
HAVE_HWFR 1
+#define
HAVE_HWSIT 1
diff -urNp
net-tools.orig/config.status net-tools/config.status
--- net-tools.orig/config.status
Thu Jan 1 02:00:00 1970
+++ net-tools/config.status
Fri Nov 14 21:36:03 1997
@@ -0,0 +1,83
@@
+#
+# config.in
Configure.sh source for the net-tools.
+# This file
contains the definition of what the support
+# library
contains. Most of all, it defines which types
+# of address
families and hardware we know of.
+#
+# NET-TOOLS
A collection of programs that form the base set of the
+# NET-3
Networking Distribution for the LINUX operating
+# system.
+#
+# Version:
config.in 1.04 (96-04-24)
+#
+# Author:
Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+# Copyright
1988-1993 MicroWalt Corporation
+#
+# Bernd
'eckes' Eckenfels <net-tools@lina.inka.de>
+#
+# Modified:
+# {1.01}
Bernd Eckenfels: generates more verbose config.h file
+#960125
{1.02} Bernd Eckenfels: reordered
+#960215
{1.03} Bernd Eckenfels: NET/ROM (Jonathan)
+#960424
{1.04} Bernd Eckenfels: NLS disabled, FR added
+#
+# This program
is free software; you can redistribute it
+# and/or
modify it under the terms of the GNU General
+# Public
License as published by the Free Software
+# Foundation;
either version 2 of the License, or (at
+# your option)
any later version.
+#
+= /*
+= * config.h
Automatically generated configuration includefile
+= *
+= * NET-TOOLS
A collection of programs that form the base set of the
+= * NET-3
Networking Distribution for the LINUX operating
+= * system.
+= *
+= * DO NOT
EDIT DIRECTLY
+= *
+= * Version:
Generated from "config.in 1.04 (96-04-24)"
+= */
+#*
+#*
+#* NLS
+#*
+#* (National
Language Support)
+#*
+#* In this
BETA Release the NLS is disabled, cause the catalougs
+#* are completely
outdated.
+#*
+#
+#
+#= #define
NLS 0
+#
+#
+# * (answer
'n' if you haye no system with national language support)
+# *
+# bool 'Does
your system support NLS?' NLS n
+#: Does
your system support NLS? (NLS) [n] NO
+*
+*
+* Protocol
Families.
+*
+bool 'UNIX
protocol family' HAVE_AFUNIX y
+bool 'INET
(TCP/IP) protocol family' HAVE_AFINET y
+bool 'INET6
(IPv6) protocol family' HAVE_AFINET6 y
+bool 'Novell
IPX/SPX protocol family' HAVE_AFIPX y
+bool 'Appletalk
DDP protocol family' HAVE_AFATALK y
+bool 'AX25
(Packet Radio) protocol family' HAVE_AFAX25 y
+bool 'NET/ROM
(Packet Radio) protocol family' HAVE_AFNETROM y
+*
+*
+* Device
Hardware types.
+*
+bool 'Ethernet
(generic) support' HAVE_HWETHER y
+bool 'ARCnet
support' HAVE_HWARC y
+bool 'SLIP
(serial line) support' HAVE_HWSLIP y
+bool 'PPP
(serial line) support' HAVE_HWPPP y
+bool 'IPIP
Tunnel support' HAVE_HWTUNNEL y
+bool 'Token
ring (generic) support' HAVE_HWTR y
+bool 'AX25
(Packet Radio) support' HAVE_HWAX25 y
+bool 'NET/ROM
(Packet Radio) support' HAVE_HWNETROM y
+bool 'DLCI/FRAD
(Frame Relay) support' HAVE_HWFR y
+bool 'SIT
(IPv6-in-IPv4) support' HAVE_HWSIT y
diff -urNp
net-tools.orig/ifconfig.c net-tools/ifconfig.c
--- net-tools.orig/ifconfig.c
Tue Sep 23 23:05:24 1997
+++ net-tools/ifconfig.c
Fri Nov 14 21:41:20 1997
@@ -40,14
+40,14 @@
/*
* This is in linux/include/net/ipv6.h.
- */
+ *
struct in6_ifreq
{
struct in6_addr ifr6_addr;
__u32 ifr6_prefixlen;
unsigned int ifr6_ifindex;
};
-
+*/
#define IPV6_ADDR_ANY 0x0000U
#define IPV6_ADDR_UNICAST
0x0001U
diff -urNp net-tools.orig/lib/inet6_gr.c net-tools/lib/inet6_gr.c
--- net-tools.orig/lib/inet6_gr.c Fri Aug 1 15:06:38 1997
+++ net-tools/lib/inet6_gr.c Fri Nov 14 21:37:23 1997
@@ -17,7 +17,7 @@
#include <string.h>
#include <stdio.h>
#include <unistd.h>
-#include <netinet/ip6.h>
+#include <netinet/in6.h>
#ifndef __GLIBC__
#include <netinet6/ipv6_route.h> /* glibc doesn't have this
*/
#endif
diff -urNp net-tools.orig/version.h net-tools/version.h
--- net-tools.orig/version.h Thu Jan 1 02:00:00 1970
+++ net-tools/version.h Fri Nov 14 21:36:03 1997
@@ -0,0 +1 @@
+#define RELEASE "net-tools 1.432"
A.5
Αρχείο radvd-0.4.1b.patch
diff -urNp
radvd-0.4.1.orig/Makefile.in radvd-0.4.1/Makefile.in
--- radvd-0.4.1.orig/Makefile.in Thu Oct 23 23:24:53 1997
+++ radvd-0.4.1/Makefile.in Fri Nov 14 21:59:09 1997
@@ -102,7 +102,7 @@ realclean: distclean
$(RM) -f lex.yy.c y.tab.c y.tab.h configure config.h.in
install:
all
- $(srcdir)/mkinstalldirs $(sbindir) $(mandir)/man8 $(mandir)/man5
+# $(srcdir)/mkinstalldirs $(sbindir) $(mandir)/man8 $(mandir)/man5
$(INSTALL_PROGRAM) radvd $(sbindir)/radvd
$(INSTALL_PROGRAM) radvdump $(sbindir)/radvdump
$(INSTALL_DATA) radvd.8 $(mandir)/man8/radvd.8
A.6
Το αρχείο /usr/inet6/etc/hosts
# inet6-apps
adds these special IPv6 addresses
::1 ipv6-localhost ipv6-loopback
fe00::0 ipv6-localnet
ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
A.7
Το αρχείο /usr/inet6/etc/protocols
#
# Internet (IP) protocols
#
# @(#)protocols 8.1 (Berkeley) 6/9/93
#
#
# Includes some new IPv6 protocols, such as ICMPv6 and IPv6-in-IPv6
ip 0 IP # internet protocol v4, pseudo protocol number
icmp 1 ICMP # internet control message protocol
igmp 2 IGMP # internet group management protocol
ggp 3 GGP # gateway-gateway protocol
tcp 6 TCP # transmission control protocol
egp 8 EGP # exterior gateway protocol
pup 12 PUP # PARC universal packet protocol
udp 17 UDP # user datagram protocol
hmp 20 HMP # host monitoring protocol
xns-idp 22 XNS-IDP # Xerox NS IDP
rdp 27 RDP # reliable data protocol
iso-tp4 29 ISO-TP4 # ISO Transport Protocol Class 4
ipv6 41 IPv6 # Internet Protocol, version 6
esp 50 ESP # IPSEC esp
ah 51 AH # IPSEC ah
icmpv6 58 ICMPV6 # Internet Control Message Protocol version 6
iso-ip 80 ISO-IP # ISO Internet Protocol
encap 98 ENCAP # RFC1241 encapsulation
A.8
Αρχείο /usr/inet6/etc/sysconfig/network-ip6
# /etc/sysconfig/network-ip6
# IPv6 network configuration file
# Author: Peter Bieringer pb@bieringer.de
# Date: 25.09.1997
## IPv6 configuration
debugging
# bit0: show all commands
# bit1: don't execute anything
# bit2: shows messages in the test section
IP6DEBUG=4
## IPv6 network
configuration? {yes|no}
IP6NETWORKING=yes
#IP6NETWORKING=no
# Take information
from the file
IP6INTERFACEFILE=/usr/inet6/etc/sysconfig/network-ip6.conf
## Gateway
network configuration
# for i.e. routing IPv6 packages over local IPv6 routers
# similar to the default gateway in IPv4)
# Allow gateway
configurations {yes|no}
IP6GATEWAYCONFIG=yes
#IP6GATEWAYCONFIG=no
# Take information from the file
IP6ROUTEFILE=/usr/inet6/etc/sysconfig/network-ip6.conf
## IPv6 tunnels
# for tunneling IPv6 packages over IPv4 routers to a IPv6 tunnel
endpoint
# i.e. 6bone connection, ask a 6bone partner near your location
for set up
# tunnel to you
# Allow IPv6 tunnel interface configuration {yes|no}
IP6TUNNELCONFIG=no
#IP6TUNNELCONFIG=yes
# Take information
from the file
IP6TUNNELFILE=/usr/inet6/etc/sysconfig/network-ip6.conf
## Router
Advertisement Daemon
# Start Daemon {yes|no}
IP6RADVD=yes
#IP6RADVD=no
# Sepcify
configuration file
IP6RADVDFILE="/usr/inet6/etc/radvd.conf"
# Specify
options
IP6RADVDOPTIONS="-d 4 -m logfile -l /var/log/radvd.log"
A.9
Αρχείο /usr/inet6/etc/sysconfig/network-ip6.conf
# /etc/sysconfig/network-ip6.conf
#
# IPv6 configuration file
#
# Author: Peter Bieringer pb@bieringer.de
# Version 2.10 09.09.1997
#This file
is needed by 'functions-ip6' version 2.xx
### The order
in the file is only for a good overview, it is not really
### necessary. The important values are 'device' and 'key'!
#################
Tunnel section
## Here you
can configure tunnel endpoints. Be sure, that you set the device
## entry in a right way like 'sit1', 'sit2' and so on, otherwise
you will get
## an error information from 'functions-ip6'
#Device Key
IPv4 gateway address
#sit1 tunnel 193.96.148.250
#sit1 tunnel 192.168.1.1
# Tunnel
route section
# Here you can specify several routes to your configured tunnels.
# More than one are possible!
#Device Key
Network
#sit1 route 5f00::/8
#sit1 route 3f00::/8
#sit2 route 5f04::/10
#################
Interface section
## Here you
can specify several addresses for your interfaces.
## More than one are possible!
#Device Key
prefix suffix length
#eth0 iface ffc0:0:0:0:1 0:0:20 10
eth0 iface 2000:0:0:1 0:0:0:20 64
#eth0
#eth1 iface ffc0:0:0:0:2 0:0:20 10
#eth1 iface 5f04:fb00:c160:9400:1102 0:0:20 80
#eth1
#################
Gateway section
## Here you
can specify several routes to your gateway.
## More than one are possible!
#Device Key
Gateway address Network
#eth0 route ffc0:0:0:0:1:0:0:1 ffc0::/64
#eth0 route 5f04:fb00:c160:9400:1101:0:0:1 5f00::/8
#eth0 route 5f04:fb00:c160:9400:1101:0:0:1 3f00::/8
A.10
Αρχείο /usr/inet6/etc/sysconfig/network-scripts/ifup
#!/bin/sh
PATH=/usr/inet6/sbin:/usr/inet6/bin:/sbin:/usr/sbin:/bin:/usr/bin
echo "$0
$1 executed..."
DEVICE=$1
# IPv6 section
if [ -f /usr/inet6/etc/rc.d/init.d/functions-ip6 ]; then
. /usr/inet6/etc/rc.d/init.d/functions-ip6
ifup-ip6 ${DEVICE}
ifup-routes-ip6 ${DEVICE}
fi
A.11
Αρχείο /usr/inet6/etc/sysconfig/network-scripts/ifdown
#! /bin/sh
PATH=/usr/inet6/sbin:/usr/inet6/bin:/sbin:/usr/sbin:/bin:/usr/bin
echo "$0
$1 executed..."
DEVICE=$1
# IPv6 section
if [ -f /usr/inet6/etc/rc.d/init.d/functions-ip6 ]; then
. /usr/inet6/etc/rc.d/init.d/functions-ip6
ifdown-routes-ip6
${DEVICE}
ifdown-ip6 ${DEVICE}
fi
A.12
Αρχείο /usr/inet6/etc/sysconfig/rc.d/init.d/functions-ip6
#!/bin/sh
#
# /etc/init.d/functions-ip6
#
# Several IPv6 related functions
#
# Author: Peter Bieringer pb@bieringer.de
# Version: 2.34a 17.11.1997
#
#
# Contains:
#
# ifup-ip6 {device}, ifdown-ip6 {device}
# ifup-routes-ip6 {device}, ifdown-routes-ip6 {device}
# tunnels-up-ip6, tunnels-down-ip6
# Changes
from:
# 2.34: Now supports Autoloading of IPv6 module. (byharisk@saturn.epmhs.gr)
# : Changed paths so IPv6 commands are used. (byharisk@saturn.epmhs.gr)
# 2.33: new debug level (bit 2)
# 2.32: exchange 'exit' with 'return' (bad mistake...)
PATH=/usr/inet6/sbin:/usr/inet6/bin:$PATH
IP6NETWORKFILE=/usr/inet6/etc/sysconfig/network-ip6
OSRELEASE=`cat /proc/sys/kernel/osrelease`
# debug level & 2 prevents from executing any network configuration
# debug level & 4 shows messages in the test section
##### Test
for IPv6
function
test-ip6()
{
if [ "$IP6DEBUG" = "" ] ; then IP6DEBUG=0;
fi
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo " Tests for IPv6"
fi
# Test for IPv6 kernel
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo -e " Test kernel for IPv6...\c"
fi
if ! [ -f /proc/net/if_inet6 ]; then
echo "IPv6 not enabled in Kernel"
echo -n " checking for IPv6 Module..."
if ! [ -f /lib/modules/$OSRELEASE/ipv6/ipv6.o ]; then
echo "Not Present"
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo -e "\a Not compiled for IPv6 - stop!"
else
echo -e "\a Kernel not compiled for IPv6 - stop!"
fi
return 1
else
echo "OK!"
modprobe ipv6
fi
else
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo " Ok!"
fi
fi
# Exists
primary configuration file?
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo -e " Exists configuration file $IP6NETWORKFILE?\c"
fi
if [ ! -f
$IP6NETWORKFILE ]; then
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo -e "\a No - stop!"
else
echo -e "\a Configuration file $IP6NETWORKFILE missing -
stop!"
fi
return 2
else
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo " Yes!"
fi
fi
# Get variables
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo " Get variables from configuration file"
fi
IP6DEBUGSAVE=$IP6DEBUG
source $IP6NETWORKFILE
IP6DEBUG=$[ $IP6DEBUG | $IP6DEBUGSAVE ]
# IPv6 configuration
enabled?
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo -e " Is IPv6 configuration enabled?\c"
fi
if ! [ "$IP6NETWORKING" = "yes" ] ; then
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo -e "\a No - stop!"
else
echo -e "\a IPv6 configuration isn't enabled - stop!"
fi
return 3
else
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo " Yes!"
fi
fi
# Info about
executing
if [ $[ $IP6DEBUG > 0 ] = 1 ]; then
echo -e "\a Executing in debug mode: $IP6DEBUG"
fi
if ! [ $[
$IP6DEBUG & 1 ] = 0 ]; then
set -x
fi
}
function
return-ip6()
{
if ! [ $[ $IP6DEBUG & 1 ] = 0 ]; then
set +x
fi
}
##### Static route configuration
function
ifup-routes-ip6()
{
# Run IPv6 test
test-ip6 || return 1
if ! [ "$IP6GATEWAYCONFIG"
= "yes" ]; then return 1; fi
echo "
Configure IPv6 static routes"
if [ "$1"
= "" ]; then
echo -e "\a Usage: $0 <net-device>"
return 1
fi
# Exists
route configuration file?
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo -e " Exists route configuration file $IP6ROUTEFILE?\c"
fi
if ! [ -f $IP6ROUTEFILE ]; then
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo -e "\a No - stop!"
else
echo -e " Route configuration file $IP6ROUTEFILE missing
- stop!"
fi
return 2
else
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo " Yes!"
fi
fi
# Switch on IPv6 forwarding in the kernel (default off in hacker
kernel)
echo " Switch on IPv6 forwarding in the kernel"
if [ $[ $IP6DEBUG & 2 ] = 0 ]; then
echo 1 > /proc/sys/net/ipv6/forwarding
fi
grep "^$1"
$IP6ROUTEFILE | while read device key gateway route; do
if [ "$key" = "route" ]; then
echo " Add IPv6 route $route gw $gateway dev $device"
if [ $[ $IP6DEBUG & 2 ] = 0 ]; then
route -A inet6 add $route gw $gateway metric 1 dev $device
fi
fi
done
return-ip6
}
function
ifdown-routes-ip6()
{
# Run IPv6 test
test-ip6 || return 1
if ! [ "$IP6GATEWAYCONFIG"
= "yes" ]; then return 1; fi
echo " Clear IPv6 routes"
if [ "$1" = "" ]; then
echo -e "\a Usage: $0 <net-device>"
return 1
fi
# Exists
route configuration file?
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo -e " Exists route configuration file $IP6ROUTEFILE?\c"
fi
if ! [ -f $IP6ROUTEFILE ]; then
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo -e "\a No - stop!"
else
echo -e " Route configuration file $IP6ROUTEFILE missing
- stop!"
fi
return 2
else
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo " Yes!"
fi
fi
grep "^$1"
$IP6ROUTEFILE | while read device key gateway route; do
if [ "$key" = "route" ]; then
echo " Del IPv6 route $route gw $gateway dev $device"
if [ $[ $IP6DEBUG & 2 ] = 0 ]; then
route -A inet6 del $route gw $gateway dev $device
fi
fi
done
return-ip6
}
##### tunnel
configuration
## Configure
tunnels up
function tunnels-up-ip6()
{
# Run IPv6 test
test-ip6 || return 1
if ! [ "$IP6TUNNELCONFIG"
= "yes" ]; then return 1; fi
echo "
Add IPv6 tunnels"
# Exists
tunnel configuration file?
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo -e " Exists tunnel configuration file $IP6TUNNELFILE?\c"
fi
if ! [ -f $IP6TUNNELFILE ]; then
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo -e "\a No - stop!"
else
echo -e "\a Tunnel configuration file $IP6TUNNELFILE missing
- stop!"
fi
return 2
else
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo " Yes!"
fi
fi
# get IPv6-over-IPv4 tunnels up (enables automatic to 0::0/96)
echo " Get IPv6-over-IPv4 tunnels up (enables automatic to
0::0/96)"
if [ $[ $IP6DEBUG & 2 ] = 0 ] ; then
ifconfig sit0 up
fi
# Take configured
tunnels from $IP6TUNNELFILE
TUNNELDEV=1
grep "^sit"
$IP6TUNNELFILE | while read device key ip4gateway; do
if [ "$device"
= "sit$TUNNELDEV" ]; then
if [ "$key"
= "tunnel" ]; then
echo " Add tunnel sit$TUNNELDEV to $ip4gateway"
# Set up
a tunnel
if [ $[ $IP6DEBUG & 2 ] = 0 ]; then
ifconfig sit0 tunnel ::$ip4gateway
fi
# Start tunnel
device sit?
if [ $[ $IP6DEBUG & 2 ] = 0 ]; then
ifconfig sit$TUNNELDEV up
fi
grep "^sit$TUNNELDEV"
$IP6TUNNELFILE | while { read device key network; } do
if [ "$key"
= "route" ]; then
echo " Add route to tunnel sit$TUNNELDEV for network $network"
# Set route
to tunnel
if [ $[ $IP6DEBUG & 2 ] = 0 ]; then
route -A inet6 add $network gw fe80::$ip4gateway dev sit$TUNNELDEV
fi
fi
done
# Increment
for next tunnel
TUNNELDEV=$[ $TUNNELDEV + 1 ]
fi
fi
done
#won't work,
problem with local scope in while...
# if [ $[ $TUNNELDEV < 2 ] = 1 ]; then
# echo -e "\a No tunnels configured!"
# echo " $IP6TUNNELFILE: possible error in your tunnel setup!"
# fi
return-ip6
}
## Configure
tunnels down
function tunnels-down-ip6()
{
# Run IPv6 test
test-ip6 || return 1
if ! [ "$IP6TUNNELCONFIG"
= "yes" ]; then return 1; fi
echo "
Delete IPv6 tunnels"
# Exists
tunnel configuration file?
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo -e " Exists tunnel configuration file $IP6TUNNELFILE?\c"
fi
if ! [ -f $IP6TUNNELFILE ]; then
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo -e "\a No - stop!"
else
echo -e "\a Tunnel configuration file $IP6TUNNELFILE missing
- stop!"
fi
return 2
else
if ! [ $[ $IP6DEBUG & 4 ] = 0 ] ; then
echo " Yes!"
fi
fi
TUNNELDEV=1
# Take configured
tunnels from $IP6TUNNELFILE
grep "^sit"
$IP6TUNNELFILE | while read device key ip4gateway; do
if [ "$device"
= "sit$TUNNELDEV" ]; then
if [ "$key"
= "tunnel" ]; then
grep "^sit$TUNNELDEV"
$IP6TUNNELFILE | while read device key network; do
if [ "$key"
= "route" ]; then
echo " Del route to tunnel sit$TUNNELDEV for network $network"
# Set route
to tunnel
if [ $[ $IP6DEBUG & 2 ] = 0 ]; then
route -A inet6 del $network gw fe80::$ip4gateway dev sit$TUNNELDEV
fi
fi
done
echo "
Delete tunnel sit$TUNNELDEV"
# Stop tunnel
device sit?
if [ $[ $IP6DEBUG & 2 ] = 0 ]; then
ifconfig sit$TUNNELDEV down
fi
# Increment for next tunnel
TUNNELDEV=$[ $TUNNELDEV + 1 ]
fi
fi
done
# Stop IPv6-over-IPv4
tunnels
echo " Stop IPv6-over-IPv4 tunnels"
if [ $[ $IP6DEBUG & 2 ] = 0 ] ; then
echo " Delete basic tunnel device sit0"
ifconfig sit0 down
fi
return-ip6
}
##### Interface
configuration
## Configure
interfaces up
function
ifup-ip6()
{
if [ "$1" = "" ]; then
echo -e "\a Usage: $0 <net-device>"
return 1
fi
# Device
"lo" need no IPv6 configuration
if [ "$1" = "lo" ]; then
echo " Device lo needs no IPv6 configuration"
return 1;
fi
# Run IPv6
test
test-ip6 || return 1
echo "
Brings interface $1 up for IPv6"
if [ ! -f
$IP6INTERFACEFILE ]; then
echo -e "\a File: $IP6INTERFACEFILE does'n exists!"
return 2
fi
grep "^$1"
$IP6INTERFACEFILE | while read device key prefix suffix length;
do
if [ "$key" = "iface" ]; then
echo " Add for dev $device IPv6 address $prefix:$suffix/$length"
if [ $[ $IP6DEBUG & 2 ] = 0 ]; then
ifconfig $device add $prefix:$suffix/$length
fi
echo "
Add IPv6 route $prefix::0/$length through dev $device"
if [ $[ $IP6DEBUG & 2 ] = 0 ]; then
route -A inet6 add $prefix::0/$length dev $device
fi
fi
done
return-ip6
}
## Configure
interfaces down
function
ifdown-ip6()
{
if [ "$1" = "" ]; then
echo -e "\a Usage: $0 <net-device>"
return 1
fi
# Device
"lo" need no IPv6 configuration
if [ "$1" = "lo" ]; then return 0; fi
# Run IPv6
test
test-ip6 || return 1
echo "
Brings interface $1 down from IPv6"
if [ ! -f
$IP6INTERFACEFILE ]; then
echo -e "\a File: $IP6INTERFACEFILE does'n exists!"
return 2
fi
grep "^$1" $IP6INTERFACEFILE | while read device key
prefix suffix length; do
if [ "$key" = "iface" ]; then
echo " Del IPv6 route $prefix::0/$length through dev $device"
if [ $[ $IP6DEBUG & 2 ] = 0 ]; then
route -A inet6 del $prefix::0/$length dev $device
fi
echo "
Del for dev $device IPv6 address $prefix:$suffix/$length"
if [ $[ $IP6DEBUG & 2 ] = 0 ]; then
ifconfig $device del $prefix:$suffix/$length
fi
fi
done
return-ip6
}
A .13
Αρχείο /usr/inet6/etc/sysconfig/rc.d/init.d/network-ip6
#!/bin/sh
#
# network-ip6 Bring up/down IPv6 networking
#
# Source function library.
. /usr/inet6/etc/rc.d/init.d/functions-ip6
if [ ! -f
${IP6NETWORKFILE} ]; then
exit 0
fi
. ${IP6NETWORKFILE}
# Check that
networking is up.
[ ${IP6NETWORKING} = "no" ] && exit 0
[ -f /usr/inet6/sbin/ifconfig
] || exit 0
cd /usr/inet6/etc/sysconfig/network-scripts
interfaces="eth0
eth1"
#`ls ifcfg* | grep -v ifcfg-lo | grep -v :`
# See how
we were called.
case "$1" in
start)
# ./ifup ifcfg-lo
for i in $interfaces; do
./ifup $i
done
touch /var/lock/subsys/network-ip6
;;
stop)
for i in $interfaces; do
./ifdown $i boot
done
./ifdown ifcfg-lo
rm -f /var/lock/subsys/network-ip6
;;
*)
echo "Usage: network-ip6 {start|stop}"
exit 1
esac
exit 0
A.14
Αρχείο /usr/inet6/etc/sysconfig/rc.d/init.d/tunnels-ipv6.init
#!/bin/sh
#
# /etc/init.d/tunnels-ip6.init
#
# Peter Bieringer pb@bieringer.de
# Date: 09.09.1997
#
# Starts and stops the IPv6 over IPv4 tunnels
echo "$0
$1 executed..."
# Source
function library.
[ -f /etc/init.d/functions ] || exit 0
. /etc/init.d/functions
# Source
IPv6 function library.
[ -f /etc/rc.d/init.d/functions-ip6 ] || exit 0
. /etc/rc.d/init.d/functions-ip6
test-ip6
|| exit 1
# Check that
tunnels are enabled.
if ! [ "$IP6TUNNELCONFIG" = "yes" ]; then
echo -e "\a ...isn't enabled - stop!"
exit 0
fi
# See how
we were called.
case "$1" in
start)
# Start tunnels.
tunnels-up-ip6
;;
stop)
# Stop tunnels.
tunnels-down-ip6
;;
*)
echo "Usage: tunnel-ip6.init {start|stop}"
exit 1
esac
return-ip6
exit 0
A.15
Αρχείο /usr/inet6/etc/sysconfig/rc.d/init.d/radvd.init
#!/bin/sh
#
# /etc/init.d/radvd.init
#
# Peter Bieringer pb@bieringer.de
# Date: 09.09.1997
#
# Starts and stops the IPv6 router advertisement daemon
echo "$0 $1 executed..."
# Source
function library.
[ -f /etc/rc.d/init.d/functions ] || exit 0
. /etc/rc.d/init.d/functions
# Source
IPv6 function library.
[ -f /usr/inet6/etc/rc.d/init.d/functions-ip6 ] || exit 0
. /usr/inet6/etc/rc.d/init.d/functions-ip6
test-ip6
|| exit 1
# Check that
RADVD is enabled.
if ! [ "$IP6RADVD" = "yes" ]; then
echo -e "\a ...isn't enabled - stop!"
exit 0
fi
# See how
we were called.
case "$1" in
start)
if ! [ -f $IP6RADVDFILE ]; then
echo " RADVD config file $IP6RADVD doesn't exist - stop!"
else
# Start daemons
echo " Starting radvd: options: $IP6RADVDOPTIONS -C $IP6RADVDFILE"
if [ $[ $IP6DEBUG & 2 ] = 0 ]; then
radvd -C $IP6RADVDFILE $IP6RADVDOPTIONS &
touch /var/lock/subsys/radvd
fi
echo
fi
;;
stop)
# Stop daemons.
echo -n " Stoping radvd: "
if [ $[ $IP6DEBUG & 2 ] = 0 ]; then
killproc radvd
rm -f /var/lock/subsys/radvd
fi
echo "done"
;;
*)
echo "Usage: radvd.init {start|stop}"
exit 1
esac
return-ip6
exit 0
A.16
Αρχείο /usr/inet6/etc/sysconfig/rc.d/init.d/inet6
#! /bin/sh
#
# inet Start TCP/IP networking services. This script
# sets the hostname, creates the routes and
# starts the Internet Network Daemon & RPC portmapper.
#
# Author: Miquel van Smoorenburg, miquels@drinkel.nl.mugnet.org
# Various folks at Red Hat
#
# Source
function library
. /etc/rc.d/init.d/functions
# Source
function-ip6 library.
. /usr/inet6/etc/rc.d/init.d/functions-ip6
# Get config.
. /usr/inet6/etc/sysconfig/network-ip6
# Check that
networking is up.
if [ ${IP6NETWORKING} = "no" ]
then
echo "ERROR: No IPv6 Networking Enabled"
exit 0
fi
[ -f /usr/inet6/bin/inetd
] || exit 0
# See how
we were called.
case "$1" in
start)
echo -n "Starting INET services: "
daemon /usr/inet6/bin/inetd /usr/inet6/etc/inetd.conf
echo
touch /var/lock/subsys/inet
;;
stop)
# bringing down NFS filesystems isn't inet's problem I don't know
# why this script used to do that -- ewt
echo -n "Stopping INET services: "
killproc inetd
echo
rm -f /var/lock/subsys/inet
;;
*)
echo "Usage: inet6 {start|stop}"
exit 1
esac
exit 0
A.17
Αρχείο /usr/inet6/etc/radvd.conf
interface
eth0 {
AdvSendAdvert on;
MaxRtrAdvInterval 70;
prefix 2000:0:0:1::0/64 {
AdvOnLink on;
AdvAutonomous on;
AdvPreferredLifetime 3600;
AdvValidLifetime 7200;
};
prefix 20c0:4:34f2::0/48
{
AdvOnLink on;
AdvAutonomous on;
};
};
A.18
Αρχείο /usr/inet6/etc/inetd.conf
#
# inetd.conf This file describes the services that will be available
# through the INETD TCP/IP super server. To re-configure
# the running INETD process, edit this file, then send the
# INETD process a SIGHUP signal.
#
# Version: @(#)/etc/inetd.conf 3.10 05/27/93
#
# Authors: Original taken from BSD UNIX 4.3/TAHOE.
# Fred N. van Kempen, waltje@uwalt.nl.mugnet.org
# Modified for Debian Linux by Ian A. Murdock imurdock@shell.portal.com
#
# Modified for RHS Linux by Marc Ewing marc@redhat.com
#
# <service_name> <sock_type> <proto> <flags>
<user> <server_path> <args>
#
# Echo, discard, daytime, and chargen are used primarily for testing.
#
# To re-read this file after changes, just do a 'killall -HUP
inetd'
#
#echo stream tcp nowait root internal
#echo dgram udp wait root internal
#discard stream tcp nowait root internal
#discard dgram udp wait root internal
#daytime stream tcp nowait root internal
#daytime dgram udp wait root internal
#chargen stream tcp nowait root internal
#chargen dgram udp wait root internal
#
# These are standard services.
#
ftp stream tcp nowait root /usr/inet6/bin/ftpd ftpd -l
telnet stream tcp nowait root /usr/inet6/bin/telnetd telnetd
#gopher stream tcp nowait root /usr/sbin/tcpd gn
# do not
uncomment smtp unless you *really* know what you are doing.
# smtp is handled by the sendmail daemon now, not smtpd. It does
NOT
# run from here, it is started at boot time from /etc/rc.d/rc#.d.
#smtp stream tcp nowait root /usr/bin/smtpd smtpd
#nntp stream tcp nowait root /usr/sbin/tcpd in.nntpd
#
# Shell, login, exec and talk are BSD protocols.
#
#shell stream tcp nowait root /usr/sbin/tcpd in.rshd
#login stream tcp nowait root /usr/sbin/tcpd in.rlogind
#exec stream tcp nowait root /usr/sbin/tcpd in.rexecd
#talk dgram udp wait root /usr/sbin/tcpd in.talkd
#ntalk dgram udp wait root /usr/sbin/tcpd in.ntalkd
#dtalk stream tcp waut nobody /usr/sbin/tcpd in.dtalkd
#
# Pop and imap mail services et al
#
#pop-2 stream tcp nowait root /usr/sbin/tcpd ipop2d
#pop-3 stream tcp nowait root /usr/sbin/tcpd ipop3d
#imap stream tcp nowait root /usr/sbin/tcpd imapd
#
# The Internet UUCP service.
#
#uucp stream tcp nowait uucp /usr/sbin/tcpd /usr/lib/uucp/uucico
-l
#
# Tftp service is provided primarily for booting. Most sites
# run this only on machines acting as "boot servers."
Do not uncomment
# this unless you *need* it.
#
#tftp dgram udp wait root /usr/sbin/tcpd in.tftpd
#bootps dgram udp wait root /usr/sbin/tcpd bootpd
#
# Finger, systat and netstat give out user information which may
be
# valuable to potential "system crackers." Many sites
choose to disable
# some or all of these services to improve security.
#
# cfinger is for GNU finger, which is currently not in use in
RHS Linux
#
finger stream tcp nowait root /usr/inet6/bin/fingerd fingerd
#cfinger stream tcp nowait root /usr/sbin/tcpd in.cfingerd
#systat stream tcp nowait guest /usr/sbin/tcpd /bin/ps -auwwx
#netstat stream tcp nowait guest /usr/sbin/tcpd /bin/netstat -f
inet
#
# Time service is used for clock syncronization.
#
#time stream tcp nowait nobody /usr/sbin/tcpd in.timed
#time dgram udp wait nobody /usr/sbin/tcpd in.timed
#
# Authentication
#
#auth stream tcp nowait nobody /usr/sbin/in.identd in.identd -l
-e -o
#
# End of inetd.con