diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2017-04-18 16:18:59 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2017-04-18 16:19:42 +0300 |
commit | d1c33d02cd260183401aa32ef7b9f83360467078 (patch) | |
tree | af91a137b350f2c38670e43cb535c805c405a14e | |
parent | e3fc927ee321ed6663d46357de0165340b792860 (diff) | |
download | accel-ppp-d1c33d02cd260183401aa32ef7b9f83360467078.tar.gz accel-ppp-d1c33d02cd260183401aa32ef7b9f83360467078.zip |
shaper: fixed bug in class id allocation procedure
this is related only for htb
-rw-r--r-- | accel-pppd/shaper/shaper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/accel-pppd/shaper/shaper.c b/accel-pppd/shaper/shaper.c index 03adfe2..e0d9569 100644 --- a/accel-pppd/shaper/shaper.c +++ b/accel-pppd/shaper/shaper.c @@ -121,7 +121,7 @@ static int alloc_idx(int init) pthread_rwlock_wrlock(&shaper_lock); if (idx_map[init / __BITS_PER_LONG] & (1 << (init % __BITS_PER_LONG))) { i = init / __BITS_PER_LONG; - p = init % __BITS_PER_LONG; + p = (init % __BITS_PER_LONG) + 1; } else { for (i = init / __BITS_PER_LONG; i < MAX_IDX / __BITS_PER_LONG; i++) { p = ffs(idx_map[i]); |