diff options
author | StasN77 <stasn77@gmail.com> | 2024-04-27 16:23:39 +0300 |
---|---|---|
committer | StasN77 <stasn77@gmail.com> | 2024-04-27 16:23:39 +0300 |
commit | 896c937ce3788e4f39622f76ca38b973a098e3af (patch) | |
tree | 557aaaeffdcb71eabe5b7fb4b0fccb330a183ec6 | |
parent | f2355094af2911b9e86f55a74fc7fd4fa5401011 (diff) | |
download | accel-ppp-896c937ce3788e4f39622f76ca38b973a098e3af.tar.gz accel-ppp-896c937ce3788e4f39622f76ca38b973a098e3af.zip |
clsact + fwmark
-rw-r--r-- | accel-pppd/shaper/limiter.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/accel-pppd/shaper/limiter.c b/accel-pppd/shaper/limiter.c index 423b9969..5527a12c 100644 --- a/accel-pppd/shaper/limiter.c +++ b/accel-pppd/shaper/limiter.c @@ -498,7 +498,7 @@ static int install_fwmark(struct rtnl_handle *rth, int ifindex, int parent) req.t.tcm_ifindex = ifindex; req.t.tcm_handle = conf_fwmark; req.t.tcm_parent = parent; - req.t.tcm_info = TC_H_MAKE(90 << 16, ntohs(ETH_P_IP)); + req.t.tcm_info = TC_H_MAKE(90 << 16, ntohs(ETH_P_ALL)); addattr_l(&req.n, sizeof(req), TCA_KIND, "fw", 3); tail = NLMSG_TAIL(&req.n); @@ -580,8 +580,12 @@ int install_limiter(struct ap_session *ses, int down_speed, int down_burst, int } } - if (conf_fwmark) - install_fwmark(rth, ses->ifindex, 0x00010000); + if (conf_fwmark) { + if (conf_down_limiter == LIM_CLSACT) + install_fwmark(rth, ses->ifindex, TC_H_MAKE(TC_H_CLSACT, TC_H_MIN_EGRESS)); + else + install_fwmark(rth, ses->ifindex, 0x00010000); + } net->rtnl_put(rth); |