aboutsummaryrefslogtreecommitdiffstats
path: root/tests/busybr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/busybr')
-rwxr-xr-xtests/busybr23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/busybr b/tests/busybr
new file mode 100755
index 0000000..bdaed46
--- /dev/null
+++ b/tests/busybr
@@ -0,0 +1,23 @@
+#! /bin/sh
+BR=${1:-"br549"}
+ETH0=${1:-"eth0"}
+ETH1=${1:-"eth1"}
+
+# fetch ip of working br0
+IP=`/sbin/ifconfig $BR | sed -n -e 's/^.*inet addr:\([0-9][0-9\.]*\).*$/\1/p'`
+echo "Using IP address $IP"
+
+while true;
+do
+ ifconfig $BR down
+ brctl delbr $BR
+ ifconfig $ETH0 $IP
+
+ ifconfig $ETH0 0.0.0.0
+ brctl addbr $BR
+ brctl addif $BR $ETH0
+ brctl addif $BR $ETH1
+ ifconfig $BR $IP
+
+ sleep 10
+done