X-Git-Url: http://git.onelab.eu/?p=nodemanager-topo.git;a=blobdiff_plain;f=teardown-egre-link;h=5de8447c9a93d5a66beb0e3da0aa6c07659e6a24;hp=efa2aeab347a2834c225b61ba7fc86b63d22acdc;hb=HEAD;hpb=3511c268d4afb42eb6dc2dc36a0778e104aafc60 diff --git a/teardown-egre-link b/teardown-egre-link index efa2aea..5de8447 100755 --- a/teardown-egre-link +++ b/teardown-egre-link @@ -5,23 +5,7 @@ KEY=$2 LINK=${KEY}x${NODEID} EGRE=d$LINK -BRIDGE=c$LINK -ETUN1=b$LINK -MARK=`iptables -t mangle -L -v|grep -m 1 $BRIDGE|awk '{print $NF}'` - -# Remove iptables rules. Sometimes there is more than one. -while [ $? -eq 0 ]; do - iptables -t mangle -D FORWARD -o $BRIDGE -j MARK --set-mark $MARK -done - -# Get rid of etun devices, only need name of one of them -echo $ETUN1 > /sys/module/etun/parameters/delif - -# Get rid of bridge -ifconfig $BRIDGE down -brctl delbr $BRIDGE - -# Get rid of EGRE tunnel -ip tunnel del $EGRE +# Get rid of EGRE tunnel and MACVLAN interface +ip link del $EGRE