nft-qos: use prerouting chain rather than input
authorRosy Song <rosysong@rosinson.com>
Sat, 10 Nov 2018 18:47:23 +0000 (20:47 +0200)
committerHannu Nyman <hannu.nyman@iki.fi>
Sat, 10 Nov 2018 18:47:23 +0000 (20:47 +0200)
Using the input chain can only limit the upload rate in local network.
Since to do the limit rate on both native and remote, we have to
replace the input hook with prerouting.

Signed-off-by: Rosy Song <rosysong@rosinson.com>
(Added Makefile version bump)
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
net/nft-qos/Makefile
net/nft-qos/files/lib/static.sh

index 206745bfee4b2a572c3197c8ca217b1f12eb3377..6e0627d891abd61bcbf64c8ee65e71b6de8b9bf9 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nft-qos
-PKG_VERSION:=1.0.0
+PKG_VERSION:=1.0.1
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-2.0
 
index cb56b492547e92fd0bded6785a805e8570172408..95d3162b1d5fdd96adcf1e3c892e1e0ddcb2f58a 100644 (file)
@@ -43,7 +43,7 @@ qosdef_flush_static() {
 # static limit rate init
 qosdef_init_static() {
        local unit_dl unit_ul rate_dl rate_ul
-       local limit_enable limit_type hook_ul="input" hook_dl="postrouting"
+       local limit_enable limit_type hook_ul="prerouting" hook_dl="postrouting"
 
        uci_validate_section nft-qos default default \
                'limit_enable:bool:0' \
@@ -63,7 +63,7 @@ qosdef_init_static() {
 
        [ -z "$NFT_QOS_HAS_BRIDGE" ] && {
                hook_ul="postrouting"
-               hook_dl="input"
+               hook_dl="prerouting"
        }
 
        qosdef_appendx "table $NFT_QOS_INET_FAMILY nft-qos-static {\n"