You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
482 B

  1. #!/bin/sh
  2. . /lib/functions.sh
  3. mwan3_migrate_flush_conntrack() {
  4. local iface="$1"
  5. config_get value "${iface}" flush_conntrack
  6. case $value in
  7. always)
  8. uci_remove mwan3 "$iface" flush_conntrack
  9. uci_add_list mwan3 "$iface" flush_conntrack ifup
  10. uci_add_list mwan3 "$iface" flush_conntrack ifdown
  11. ;;
  12. never)
  13. uci_remove mwan3 "$iface" flush_conntrack
  14. ;;
  15. esac
  16. uci_commit mwan3
  17. }
  18. config_load mwan3
  19. config_foreach mwan3_migrate_flush_conntrack interface
  20. exit 0