ocserv-fw: when called with --removeall exit immediately after action

This commit is contained in:
Nikos Mavrogiannopoulos
2015-11-23 18:12:09 +01:00
parent ddddaee5be
commit fa6c7ac0e6

View File

@@ -7,6 +7,7 @@ COMMENT="ocserv-fw"
if test "$1" = "--removeall";then
eval "$(iptables -S | grep "comment ${COMMENT}" | sed -e 's/-A/-D/g' -e 's/^-/iptables -/g')"
eval "$(ip6tables -S | grep "comment ${COMMENT}" | sed -e 's/-A/-D/g' -e 's/^-/ip6tables -/g')"
exit 0
fi
if test "${REASON}" = "connect";then