提交 391079f1 编写于 作者: D Dmitry Kozlov

shaper: install ifb filter for all protocols

上级 446650c8
......@@ -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(
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册