summaryrefslogtreecommitdiff
path: root/tools/vlan_prototype_down.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/vlan_prototype_down.sh')
-rwxr-xr-xtools/vlan_prototype_down.sh29
1 files changed, 0 insertions, 29 deletions
diff --git a/tools/vlan_prototype_down.sh b/tools/vlan_prototype_down.sh
deleted file mode 100755
index 1db2bf9f..00000000
--- a/tools/vlan_prototype_down.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-
-# Delete the host networks for the VLAN prototype.
-# Runs as root.
-# Use at your own risk.
-
-delete_interface() {
- bridge="$(printf cvd-v${1}br-%02d $2)"
- tap="$(printf cvd-${1}vlan-%02d $2)"
- network="${3}.$((4*$2 - 4))/30"
-
- /sbin/ifconfig "${tap}" down
- ip link delete "${tap}"
-
- if [ -f /var/run/cuttlefish-dnsmasq-"${bridge}".pid ]; then
- kill $(cat /var/run/cuttlefish-dnsmasq-"${bridge}".pid)
- fi
-
- iptables -t nat -D POSTROUTING -s "${network}" -j MASQUERADE
-
- /sbin/ifconfig "${bridge}" down
- /sbin/brctl delbr "${bridge}"
-}
-
-delete_interface w 1 192.168.93
-delete_interface m 1 192.168.94
-delete_interface i 1 192.168.95
-
-ip link delete cvd-net-01