twamp: 1.2.2

This commit is contained in:
vdutta 2022-09-23 18:23:51 +05:30
parent 588478e981
commit 2660d8ad2e
2 changed files with 6 additions and 3 deletions

View file

@ -6,7 +6,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=twamp
PKG_VERSION:=1.2.1
PKG_VERSION:=1.2.2
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)

View file

@ -29,8 +29,11 @@ function configure_firewall()
function delete_rule()
{
while iptables -w 1 -L zone_${1}_input --line-numbers | grep "TWAMP reflector port" > /dev/null 2>&1; do
iptables -w 1 -D zone_${1}_input $(iptables -w 1 -L zone_${1}_input --line-numbers | grep "TWAMP reflector port" | head -1|awk '{print $1}');
while iptables -w 1 -L zone_${1}_input --line-numbers 2>/dev/null | grep "TWAMP reflector port"; do
rule_num="$(iptables -w 1 -L zone_${1}_input --line-numbers | grep "TWAMP reflector port" | head -1|awk '{print $1}')"
if [ -n "${rule_num}" ]; then
iptables -w 1 -D zone_${1}_input ${rule_num};
fi
done
}