mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
qosmngr: improve l2 classification logic
I noticed that there is a potential improvement in the way the ebtables rules are generated from the UCI file. The thing is, a restart of the firewall does not flush the ebtables, so, the ebtables have to flushed by adding the ebtables -t broute -F command in the firewall.qos (or any other script) to remove the rules generated by firewall.qos. This also flushes the rule that directed the lookup of the qos chain. Now, to the rule to lookup qos chain needs to be manually added which I think is not the best thing to do. The qosmngr should be independent in this regard, hence, this improvement.
This commit is contained in:
parent
de9a7c447d
commit
c1e7c8f103
1 changed files with 6 additions and 1 deletions
|
|
@ -90,7 +90,12 @@ handle_shaper() {
|
|||
setup_qos() {
|
||||
ebtables -t broute -N qos
|
||||
ret=$?
|
||||
[ $ret -eq 0 ] && ebtables -t broute -I BROUTING -j qos
|
||||
if [ $ret -eq 0 ]; then
|
||||
ebtables -t broute -I BROUTING -j qos
|
||||
else
|
||||
ebtables -t broute -D BROUTING -j qos
|
||||
ebtables -t broute -I BROUTING -j qos
|
||||
fi
|
||||
|
||||
iptables -t mangle -N qos_forward
|
||||
ret=$?
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue