xebd / accel-ppp

High performance PPTP/L2TP/PPPoE/IPoE server for Linux
GNU General Public License v2.0
296 stars 109 forks source link

chap-secrets: add pool name support #26

Closed themiron closed 6 years ago

themiron commented 6 years ago

Chap-secrets' ipdb uses 4th field as static peer ipv4 address. With no radius and multiple same username sessions, it's impossible to use non-default pool for such sessions. Abuse chap-secret's 4th field as pool=name to specify session's pool name. With ippool module loaded after chap-secrets (default order), it will be used for allocation from the specified poll name.

Compatibility considerations:

themiron commented 6 years ago

or, please advise, what would be other preferable way to use pass dp->pool for allocation

xebd commented 6 years ago

maybe just check if 4th field is valid ip4 address if not consider it as pool name

themiron commented 6 years ago

done, 4th field isn't empty and doesn't start with reserved chars (*-!), assume it as pool name