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:18:59 +0300 |
commit | 09afd3a638be4c64aee0d36bbfa1e45bbaa2ec51 (patch) | |
tree | c347a8a2aca1d4ef069862fac4c131c31a501ceb /accel-pppd | |
parent | 9ea88bac7d5bf8fc5cf2d5f7d0a734ec7a9e6df6 (diff) | |
download | accel-ppp-09afd3a638be4c64aee0d36bbfa1e45bbaa2ec51.tar.gz accel-ppp-09afd3a638be4c64aee0d36bbfa1e45bbaa2ec51.zip |
shaper: fixed bug in class id allocation procedure
this is related only for htb
Diffstat (limited to 'accel-pppd')
-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 03adfe24..e0d95690 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]); |