summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2017-12-26 21:15:17 +0300
committerDmitry Kozlov <xeb@mail.ru>2017-12-26 21:15:17 +0300
commit391079f127987c3e56c5d713c1b54b72417fd916 (patch)
treecf77b2656f65f26d70d727bc80f35b30794ce429
parent446650c8e1c73d02d7d2746ed79198963f8be1e6 (diff)
downloadaccel-ppp-xebd-391079f127987c3e56c5d713c1b54b72417fd916.tar.gz
accel-ppp-xebd-391079f127987c3e56c5d713c1b54b72417fd916.zip
shaper: install ifb filter for all protocols
-rw-r--r--CMakeLists.txt2
-rw-r--r--accel-pppd/shaper/limiter.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7ae1c4d..67e138a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,7 +10,7 @@ project(accel-ppp C)
include(cmake/cpack.cmake)
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fno-strict-aliasing -D_GNU_SOURCE -fPIC -rdynamic")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fno-strict-aliasing -D_GNU_SOURCE -fPIC -rdynamic -Wno-unused-result")
IF (NOT DEFINED LIB_SUFFIX)
EXECUTE_PROCESS(
diff --git a/accel-pppd/shaper/limiter.c b/accel-pppd/shaper/limiter.c
index 0a5eecc..2189fca 100644
--- a/accel-pppd/shaper/limiter.c
+++ b/accel-pppd/shaper/limiter.c
@@ -456,7 +456,7 @@ static int remove_htb_ifb(struct rtnl_handle *rth, int ifindex, int priority)
int install_limiter(struct ap_session *ses, int down_speed, int down_burst, int up_speed, int up_burst, int idx)
{
struct rtnl_handle *rth = net->rtnl_get();
- int r;
+ int r = 0;
if (!rth) {
log_ppp_error("shaper: cannot open rtnetlink\n");
@@ -582,7 +582,7 @@ int init_ifb(const char *name)
req.t.tcm_ifindex = conf_ifb_ifindex;
req.t.tcm_handle = 1;
req.t.tcm_parent = 0x00010000;
- req.t.tcm_info = TC_H_MAKE(100 << 16, ntohs(ETH_P_IP));
+ req.t.tcm_info = TC_H_MAKE(100 << 16, ntohs(ETH_P_ALL));
addattr_l(&req.n, sizeof(req), TCA_KIND, "flow", 5);