qosmngr: supressed iptables chain already exists messages

This commit is contained in:
Ratish 2023-08-08 15:03:54 +05:30
parent 3df0e75b3f
commit f2cb3f4442
2 changed files with 7 additions and 7 deletions

View file

@ -389,7 +389,7 @@ handle_ebtables_rules() {
}
create_ebtables_chains() {
ebtables -t broute -N qos
ebtables -t broute -N qos 2> /dev/null
ret=$?
if [ $ret -eq 0 ]; then
ebtables -t broute -I BROUTING -j qos

View file

@ -208,27 +208,27 @@ handle_iptables_rules() {
}
create_iptables_chains() {
iptables -w -t mangle -N qos_forward
iptables -w -t mangle -N qos_forward 2> /dev/null
ret=$?
[ $ret -eq 0 ] && iptables -w -t mangle -I FORWARD -j qos_forward
iptables -w -t mangle -N qos_prerouting
iptables -w -t mangle -N qos_prerouting 2> /dev/null
ret=$?
[ $ret -eq 0 ] && iptables -w -t mangle -I PREROUTING -j qos_prerouting
iptables -w -t mangle -N qos_output
iptables -w -t mangle -N qos_output 2> /dev/null
ret=$?
[ $ret -eq 0 ] && iptables -w -t mangle -I OUTPUT -j qos_output
ip6tables -t mangle -N qos_forward
ip6tables -t mangle -N qos_forward 2> /dev/null
ret=$?
[ $ret -eq 0 ] && ip6tables -t mangle -I FORWARD -j qos_forward
ip6tables -t mangle -N qos_prerouting
ip6tables -t mangle -N qos_prerouting 2> /dev/null
ret=$?
[ $ret -eq 0 ] && ip6tables -t mangle -I PREROUTING -j qos_prerouting
ip6tables -t mangle -N qos_output
ip6tables -t mangle -N qos_output 2> /dev/null
ret=$?
[ $ret -eq 0 ] && ip6tables -t mangle -I OUTPUT -j qos_output
}