From 07c2d29859dc1f4e40f9e367fa6aa9cc77f8538d Mon Sep 17 00:00:00 2001 From: Rosy Song Date: Sat, 10 Nov 2018 20:47:23 +0200 Subject: [PATCH] nft-qos: use prerouting chain rather than input 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 (Added Makefile version bump) Signed-off-by: Hannu Nyman --- net/nft-qos/Makefile | 2 +- net/nft-qos/files/lib/static.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/nft-qos/Makefile b/net/nft-qos/Makefile index 206745bfee..6e0627d891 100644 --- a/net/nft-qos/Makefile +++ b/net/nft-qos/Makefile @@ -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 diff --git a/net/nft-qos/files/lib/static.sh b/net/nft-qos/files/lib/static.sh index cb56b49254..95d3162b1d 100644 --- a/net/nft-qos/files/lib/static.sh +++ b/net/nft-qos/files/lib/static.sh @@ -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" -- 2.30.2