luscis / openlan

Cloudify VPN written in Golang, and simple deployment via Kubernetes
http://vpn.luscis.cn
GNU General Public License v3.0
55 stars 24 forks source link

fix: fix qos warn && qos rules redundancy when ip changed #58

Closed Teddy-Zhu closed 5 months ago

Teddy-Zhu commented 5 months ago

修复 #56 关于这个PR截图所示问题 mangle表现有规则

-A Qos_example-in-dgbw8gq -m limit --limit 105/sec --limit-burst 100 -m comment --comment "Qos Limit In hi@example" -j ACCEPT

工具删除时自动生成 规则

 iptables --wait -t mangle -D Qos_example-in-dgbw8gq -m comment --comment Qos Limit In hi@example -m limit --limit 105/s --limit-burst 100 -j ACCEPT

这里面有连个问题导致了删除报错,

  1. comment 顺序不对,与现有的表不同会删除失败
  2. comment 后的文本需要“引号包裹

修复 ip变化,qos规则冗余 ip变化规则未删除原因和上面类似