diff options
author | Denys Fedoryshchenko <denys.f@collabora.com> | 2024-04-28 08:52:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-28 08:52:56 +0300 |
commit | 1e75542ff7e80eddaa45a300121db8a30b9f77be (patch) | |
tree | e0cb51a8b4857de1dea9827c69447462717108ff /accel-pppd | |
parent | 5f28e4a08b1d5b947c4c7bd8599a3e9c9083b4c1 (diff) | |
parent | 896c937ce3788e4f39622f76ca38b973a098e3af (diff) | |
download | accel-ppp-1e75542ff7e80eddaa45a300121db8a30b9f77be.tar.gz accel-ppp-1e75542ff7e80eddaa45a300121db8a30b9f77be.zip |
Merge pull request #138 from stasn77/upstream
clsact + fwmark
Diffstat (limited to 'accel-pppd')
-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); |