summaryrefslogtreecommitdiff
path: root/testing/scripts
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2009-06-23 11:25:24 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2009-06-23 11:25:24 +0000
commit41787e147279ff0695e9d759487266a60b80867b (patch)
tree8f28566c8fd7106c80d2536d2df540dbb4499cc5 /testing/scripts
parentc3e7f611ea8273c6b3909cb006ade4903a74aad0 (diff)
downloadvyos-strongswan-41787e147279ff0695e9d759487266a60b80867b.tar.gz
vyos-strongswan-41787e147279ff0695e9d759487266a60b80867b.zip
[svn-upgrade] Integrating new upstream version, strongswan (4.3.2)
Diffstat (limited to 'testing/scripts')
-rwxr-xr-xtesting/scripts/build-hostconfig2
-rwxr-xr-xtesting/scripts/build-sshkeys2
-rwxr-xr-xtesting/scripts/build-umlhostfs2
-rwxr-xr-xtesting/scripts/build-umlkernel2
-rwxr-xr-xtesting/scripts/build-umlrootfs17
-rwxr-xr-xtesting/scripts/function.sh46
-rwxr-xr-xtesting/scripts/gstart-umls2
-rwxr-xr-xtesting/scripts/kstart-umls2
-rwxr-xr-xtesting/scripts/load-testconfig2
-rwxr-xr-xtesting/scripts/restore-defaults2
-rwxr-xr-xtesting/scripts/start-bridges64
-rwxr-xr-xtesting/scripts/start-switches39
-rwxr-xr-xtesting/scripts/start-umls2
-rwxr-xr-xtesting/scripts/stop-bridges49
-rwxr-xr-xtesting/scripts/xstart-umls2
15 files changed, 172 insertions, 63 deletions
diff --git a/testing/scripts/build-hostconfig b/testing/scripts/build-hostconfig
index 5d1c83060..0ebbc5264 100755
--- a/testing/scripts/build-hostconfig
+++ b/testing/scripts/build-hostconfig
@@ -13,8 +13,6 @@
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
-#
-# RCSID $Id: build-hostconfig 3273 2007-10-08 20:18:34Z andreas $
DIR=`dirname $0`
diff --git a/testing/scripts/build-sshkeys b/testing/scripts/build-sshkeys
index a26f0162c..799078557 100755
--- a/testing/scripts/build-sshkeys
+++ b/testing/scripts/build-sshkeys
@@ -13,8 +13,6 @@
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
-#
-# RCSID $Id: build-sshkeys 3273 2007-10-08 20:18:34Z andreas $
DIR=`dirname $0`
diff --git a/testing/scripts/build-umlhostfs b/testing/scripts/build-umlhostfs
index 7cbfe9c97..75feaa4ed 100755
--- a/testing/scripts/build-umlhostfs
+++ b/testing/scripts/build-umlhostfs
@@ -13,8 +13,6 @@
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
-#
-# RCSID $Id: build-umlhostfs 3935 2008-05-12 20:06:58Z andreas $
DIR=`dirname $0`
diff --git a/testing/scripts/build-umlkernel b/testing/scripts/build-umlkernel
index 61dee8ff5..7a98fc6c1 100755
--- a/testing/scripts/build-umlkernel
+++ b/testing/scripts/build-umlkernel
@@ -13,8 +13,6 @@
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
-#
-# RCSID $Id: build-umlkernel 3273 2007-10-08 20:18:34Z andreas $
DIR=`dirname $0`
diff --git a/testing/scripts/build-umlrootfs b/testing/scripts/build-umlrootfs
index 4eeebe54f..30dfc00ef 100755
--- a/testing/scripts/build-umlrootfs
+++ b/testing/scripts/build-umlrootfs
@@ -13,8 +13,6 @@
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
-#
-# RCSID $Id: build-umlrootfs 5006 2009-03-25 07:26:53Z andreas $
DIR=`dirname $0`
@@ -187,6 +185,11 @@ then
echo -n " --enable-openssl" >> $INSTALLSHELL
fi
+if [ "$USE_BLOWFISH" = "yes" ]
+then
+ echo -n " --enable-blowfish" >> $INSTALLSHELL
+fi
+
if [ "$USE_KERNEL_PFKEY" = "yes" ]
then
echo -n " --enable-kernel-pfkey" >> $INSTALLSHELL
@@ -207,6 +210,16 @@ then
echo -n " --enable-load-tests" >> $INSTALLSHELL
fi
+if [ "$USE_TEST_VECTORS" = "yes" ]
+then
+ echo -n " --enable-test-vectors" >> $INSTALLSHELL
+fi
+
+if [ "$USE_GCRYPT" = "yes" ]
+then
+ echo -n " --enable-gcrypt" >> $INSTALLSHELL
+fi
+
echo "" >> $INSTALLSHELL
echo "make" >> $INSTALLSHELL
echo "make install" >> $INSTALLSHELL
diff --git a/testing/scripts/function.sh b/testing/scripts/function.sh
index f147e782e..e7ecbcf83 100755
--- a/testing/scripts/function.sh
+++ b/testing/scripts/function.sh
@@ -13,8 +13,6 @@
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
-#
-# RCSID $Id: function.sh 3273 2007-10-08 20:18:34Z andreas $
############################################
@@ -83,3 +81,47 @@ function searchandreplace {
rm -f "$TMPFILE"
}
+
+#############################################
+# add a bridge
+#
+
+function umlbr_add {
+ brctl addbr "umlbr$1"
+ brctl setfd "umlbr$1" 0
+ brctl setageing "umlbr$1" 3600
+ brctl stp "umlbr$1" off
+ ifconfig "umlbr$1" "$2" netmask "$3" up
+}
+
+#############################################
+# delete a bridge
+#
+
+function umlbr_del {
+ ifconfig "umlbr$1" down &> /dev/null 2>&1
+ brctl delbr "umlbr$1" &> /dev/null 2>&1
+}
+
+#############################################
+# add a tap interface to a bridge
+#
+
+function umlbr_add_tap {
+ tunctl -t "tap$1_$2" &> /dev/null 2>&1
+ ifconfig "tap$1_$2" 0.0.0.0 promisc up &> /dev/null 2>&1
+ brctl addif "umlbr$1" "tap$1_$2" &> /dev/null 2>&1
+ cecho-n "$2.."
+ }
+
+#############################################
+# delete a tap interface from a bridge
+#
+
+function umlbr_del_tap {
+ ifconfig "umlbr$2" down &> /dev/null 2>&1
+ brctl delif "umlbr$1" "tap$1_$2" &> /dev/null 2>&1
+ tunctl -d "tap$1_$2" &> /dev/null 2>&1
+ cecho-n "$2.."
+ }
+
diff --git a/testing/scripts/gstart-umls b/testing/scripts/gstart-umls
index e5e993661..624db8d8b 100755
--- a/testing/scripts/gstart-umls
+++ b/testing/scripts/gstart-umls
@@ -13,8 +13,6 @@
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
-#
-# RCSID $Id: gstart-umls 4370 2008-10-07 04:56:50Z andreas $
DIR=`dirname $0`
diff --git a/testing/scripts/kstart-umls b/testing/scripts/kstart-umls
index b67382a25..486955a69 100755
--- a/testing/scripts/kstart-umls
+++ b/testing/scripts/kstart-umls
@@ -13,8 +13,6 @@
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
-#
-# RCSID $Id: kstart-umls 4370 2008-10-07 04:56:50Z andreas $
DIR=`dirname $0`
diff --git a/testing/scripts/load-testconfig b/testing/scripts/load-testconfig
index 873e4d1ee..8dd3069f6 100755
--- a/testing/scripts/load-testconfig
+++ b/testing/scripts/load-testconfig
@@ -13,8 +13,6 @@
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
-#
-# RCSID $Id: load-testconfig 3935 2008-05-12 20:06:58Z andreas $
DIR=`dirname $0`
diff --git a/testing/scripts/restore-defaults b/testing/scripts/restore-defaults
index 3af0ec665..b26be9936 100755
--- a/testing/scripts/restore-defaults
+++ b/testing/scripts/restore-defaults
@@ -13,8 +13,6 @@
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
-#
-# RCSID $Id: restore-defaults 3935 2008-05-12 20:06:58Z andreas $
DIR=`dirname $0`
diff --git a/testing/scripts/start-bridges b/testing/scripts/start-bridges
new file mode 100755
index 000000000..1e09d6e7d
--- /dev/null
+++ b/testing/scripts/start-bridges
@@ -0,0 +1,64 @@
+#!/bin/bash
+# start the UML bridges in the kernel using the brctl command
+#
+# Copyright (C) 2009 Andreas Steffen
+# HSR Hochschule fuer Technik Rapperswil
+#
+# 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. See <http://www.fsf.org/copyleft/gpl.txt>.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+
+DIR=`dirname $0`
+
+source $DIR/function.sh
+
+# create umlbr1 and its taps
+#
+if [ `brctl show | grep umlbr1 | wc -l` -eq 1 ]
+then
+ cecho " * Great, umlbr1 is already running!"
+else
+ cecho-n " * Starting umlbr1 with taps.."
+ umlbr_add 1 10.1.0.254 255.255.0.0
+ umlbr_add_tap 1 alice
+ umlbr_add_tap 1 venus
+ umlbr_add_tap 1 moon
+ cgecho "done"
+fi
+
+# create umlbr0 and its taps
+#
+if [ `brctl show | grep umlbr0 | wc -l` -eq 1 ]
+then
+ cecho " * Great, umlbr0 is already running!"
+else
+ cecho-n " * Starting umlbr0 with taps.."
+ umlbr_add 0 192.168.0.254 255.255.255.0
+ umlbr_add_tap 0 alice
+ umlbr_add_tap 0 moon
+ umlbr_add_tap 0 carol
+ umlbr_add_tap 0 winnetou
+ umlbr_add_tap 0 dave
+ umlbr_add_tap 0 sun
+ cgecho "done"
+fi
+
+# create umlbr2 and its taps
+#
+if [ `brctl show | grep umlbr2 | wc -l` -eq 1 ]
+then
+ cecho " * Great, umlbr2 is already running!"
+else
+ cecho-n " * Starting umlbr2 with taps.."
+ umlbr_add 2 10.2.0.254 255.255.0.0
+ umlbr_add_tap 2 sun
+ umlbr_add_tap 2 bob
+ cgecho "done"
+fi
+
diff --git a/testing/scripts/start-switches b/testing/scripts/start-switches
deleted file mode 100755
index eb3fa4742..000000000
--- a/testing/scripts/start-switches
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-# starts the UML switches
-#
-# Copyright (C) 2004 Eric Marchionni, Patrik Rayo
-# Zuercher Hochschule Winterthur
-#
-# 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. See <http://www.fsf.org/copyleft/gpl.txt>.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# RCSID $Id: start-switches 3590 2008-03-13 14:20:20Z martin $
-
-DIR=`dirname $0`
-
-source $DIR/function.sh
-
-[ -f $DIR/../testing.conf ] || die "Configuration file 'testing.conf' not found"
-
-source $DIR/../testing.conf
-
-for n in 0 1 2
-do
- if [ `ps aux | grep uml_switch | grep umlswitch$n | wc -l` -eq 1 ]
- then
- cecho " * Great, umlswitch$n is already running!"
- else
- cecho-n " * Starting umlswitch$n.."
- uml_switch -tap tap$n -unix /tmp/umlswitch$n -daemon >/dev/null 2>&1 </dev/null
- sleep 2
- eval ifconfig "tap$n \$IFCONFIG_$n up"
- cgecho "done"
- fi
-done
diff --git a/testing/scripts/start-umls b/testing/scripts/start-umls
index 823a53f5b..878494370 100755
--- a/testing/scripts/start-umls
+++ b/testing/scripts/start-umls
@@ -13,8 +13,6 @@
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
-#
-# RCSID $Id: start-umls 4370 2008-10-07 04:56:50Z andreas $
DIR=`dirname $0`
diff --git a/testing/scripts/stop-bridges b/testing/scripts/stop-bridges
new file mode 100755
index 000000000..eb92bd0eb
--- /dev/null
+++ b/testing/scripts/stop-bridges
@@ -0,0 +1,49 @@
+#!/bin/bash
+# stop the UML bridges in the kernel using the brctl command
+#
+# Copyright (C) 2009 Andreas Steffen
+# HSR Hochschule fuer Technik Rapperswil
+#
+# 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. See <http://www.fsf.org/copyleft/gpl.txt>.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+
+DIR=`dirname $0`
+
+source $DIR/function.sh
+
+# stop umlbr1 and its taps
+#
+cecho-n " * Stopping umlbr1 with taps.."
+umlbr_del_tap 1 alice
+umlbr_del_tap 1 venus
+umlbr_del_tap 1 moon
+umlbr_del 1
+cgecho "done"
+
+# stop umlbr0 and its taps
+#
+cecho-n " * Stopping umlbr0 with taps.."
+umlbr_del_tap 0 alice
+umlbr_del_tap 0 moon
+umlbr_del_tap 0 carol
+umlbr_del_tap 0 winnetou
+umlbr_del_tap 0 dave
+umlbr_del_tap 0 sun
+umlbr_del 0
+cgecho "done"
+
+# stop umlbr2 and its taps
+#
+cecho-n " * Stopping umlbr2 with taps.."
+umlbr_del_tap 2 sun
+umlbr_del_tap 2 bob
+umlbr_del 2
+cgecho "done"
+
diff --git a/testing/scripts/xstart-umls b/testing/scripts/xstart-umls
index f03452844..717199606 100755
--- a/testing/scripts/xstart-umls
+++ b/testing/scripts/xstart-umls
@@ -13,8 +13,6 @@
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
-#
-# RCSID $Id: xstart-umls 4370 2008-10-07 04:56:50Z andreas $
DIR=`dirname $0`