qos-script: Improve usability by adding comment field to rules
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 2 Jun 2014 12:44:44 +0000 (12:44 +0000)
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 2 Jun 2014 12:44:44 +0000 (12:44 +0000)
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 <roman@advem.lv>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40935 3c298f89-4303-0410-b956-a3cf2f4a3e73

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

index 440b43f..07ec34f 100755 (executable)
@@ -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