aboutsummaryrefslogtreecommitdiff
path: root/run
diff options
context:
space:
mode:
authorMarvin Borner2020-09-27 22:21:09 +0200
committerMarvin Borner2020-09-27 22:21:09 +0200
commit1901e251f3e02abad4bffeef383f1136861008dc (patch)
tree8a41cd500fec473ffb271a430550b813dc2cca10 /run
parent9286bba7b273301dd777dd15feec40492ccd9a03 (diff)
Networky things
Idk, really
Diffstat (limited to 'run')
-rwxr-xr-xrun8
1 files changed, 7 insertions, 1 deletions
diff --git a/run b/run
index a220bee..b172fc6 100755
--- a/run
+++ b/run
@@ -121,7 +121,13 @@ make_build() {
make_test() {
if [ "$mode" = "net" ]; then
- brctl show br0 >/dev/null || sudo brctl addbr br0
+ brctl show br0 &>/dev/null || (
+ sudo brctl addbr br0
+ sudo brctl addif br0 enp8s0
+ sudo ip addr add 172.20.0.1/16 dev br0
+ sudo ip link set br0 up
+ sudo iptables -I FORWARD -m physdev --physdev-is-bridged -j ACCEPT
+ )
fi
if [ "$mode" = "test" ]; then