diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2014-11-17 18:45:29 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2014-11-17 18:45:29 +0300 |
commit | ca13dfe2c774835c3aed9567747c9b8b989446ba (patch) | |
tree | aba9f272cae35c38ca24319460e5f55df3022d9a /accel-pppd/shaper/shaper.c | |
parent | be476ff24258d1c3a043c69040ab147e6ed59c5a (diff) | |
download | accel-ppp-ca13dfe2c774835c3aed9567747c9b8b989446ba.tar.gz accel-ppp-ca13dfe2c774835c3aed9567747c9b8b989446ba.zip |
shaper: introduce "fwmark" option
If specified then fwmark filters will be installed to bypass shaper
Diffstat (limited to 'accel-pppd/shaper/shaper.c')
-rw-r--r-- | accel-pppd/shaper/shaper.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/accel-pppd/shaper/shaper.c b/accel-pppd/shaper/shaper.c index 14388ed..85b0edd 100644 --- a/accel-pppd/shaper/shaper.c +++ b/accel-pppd/shaper/shaper.c @@ -43,6 +43,7 @@ int conf_r2q = 10; int conf_cburst = 1534; int conf_ifb_ifindex; static double conf_multiplier = 1; +int conf_fwmark; int conf_up_limiter = LIM_POLICE; int conf_down_limiter = LIM_TBF; @@ -972,7 +973,13 @@ static void load_config(void) conf_multiplier = atof(opt); else conf_multiplier = 1; - + + opt = conf_get_opt("shaper", "fwmark"); + if (opt) + conf_fwmark = atof(opt); + else + conf_fwmark = 0; + triton_context_call(&shaper_ctx, (triton_event_func)load_time_ranges, NULL); } @@ -981,7 +988,7 @@ static void init(void) const char *opt; tc_core_init(); - + opt = conf_get_opt("shaper", "ifb"); if (opt && init_ifb(opt)) _exit(0); |