X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;f=src%2Flibswift%2Fmfold%2Fnetclean.default.sh;fp=src%2Flibswift%2Fmfold%2Fnetclean.default.sh;h=33d08cced822998eebcaac49d9974eeb6e268387;hb=45963a7511531cd1656ad5d3847d2dafd015c54d;hp=0000000000000000000000000000000000000000;hpb=d069796805ad79542fd7e4406d1e9c6d2d8c2ef7;p=swifty.git diff --git a/src/libswift/mfold/netclean.default.sh b/src/libswift/mfold/netclean.default.sh new file mode 100644 index 0000000..33d08cc --- /dev/null +++ b/src/libswift/mfold/netclean.default.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# Cleans configuration made with netem script. + +if [ ! $EMIF ] ; then + exit +fi + +if [ ! $SWFTPORT ]; then + exit +fi + +TC="sudo tc " +CLASSID=$(($SWFTPORT - 9900)) + +echo cleaning filter and class id 1:$CLASSID from ifb0 +$TC filter del dev ifb0 protocol ip prio 1 handle 800::$CLASSID u32 \ + flowid 1:$CLASSID +$TC class del dev ifb0 classid 1:$CLASSID + +echo cleaning filter and class id 1:$CLASSID from lo +$TC filter del dev lo protocol ip prio 1 handle 800::$CLASSID u32 \ + flowid 1:$CLASSID +$TC class del dev lo classid 1:$CLASSID + +echo cleaning filter and class id 1:$CLASSID from $EMIF +$TC filter del dev $EMIF protocol ip prio 1 handle 800::$CLASSID u32 \ + flowid 1:$CLASSID +$TC class del dev $EMIF classid 1:$CLASSID