Browse Source

qos-script: Improve usability by adding comment field to rules

It's quite unconveniet to remember which ports are used by which applications, especially for not so advanced users.
Together with luci patch (discussed on IRC) this improves qos-scripts usability.

Signed-off-by: Roman Yeryomin <[email protected]>

SVN-Revision: 40935
John Crispin 11 years ago
parent
commit
9e65c01a4b
1 changed files with 4 additions and 0 deletions
  1. 4 0
      package/network/config/qos-scripts/files/usr/lib/qos/generate.sh

+ 4 - 0
package/network/config/qos-scripts/files/usr/lib/qos/generate.sh

@@ -118,6 +118,10 @@ parse_matching_rule() {
 				add_insmod ipt_connbytes
 				append "$var" "-m connbytes --connbytes $value --connbytes-dir both --connbytes-mode bytes"
 			;;
+			*:comment)
+				add_insmod xt_comment
+				append "$var" "-m comment --comment '$value'"
+			;;
 			*:tos)
                                 add_insmod ipt_tos
                                 case "$value" in