PPPoE session numbering

PPPoE related questions
Post Reply
hwoesner
Posts: 1
Joined: 10 Aug 2017, 09:09

PPPoE session numbering

Post by hwoesner »

Hi all, привет,
I am new here, so I may be getting things wrong...
Working with 1.11.0, I wondered how it comes to assign PPPoE session numbers in steps of 64 (I see session numbers 0x01, 0x40, 0x80,...)
Looking into pppoe.c, I find the following line (around line 287)
if (bit != -1) {
conn->sid = sid_idx*8*sizeof(long) + bit;
...

Is there any deeper reason for why session numbers are multiplied by 8*8 here? If I take this off, session numbers are back to increment of one, as I would expect.
Is there a configuration setting that would influence this?
Thank you in advance for your consideration,
Hagen
Dmitry
Администратор
Posts: 954
Joined: 09 Oct 2014, 10:06

Re: PPPoE session numbering

Post by Dmitry »

хм, ну если очень хочется по порядку, то добавь вот сюда break:
if (bit != -1) {
conn->sid = sid_idx*8*sizeof(long) + bit;
*sid_ptr &= ~(1lu << bit);
===> break;
}
Post Reply