xebd / accel-ppp

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

ppp: implement per-ctrl ppp interface rename support #25

Closed themiron closed 6 years ago

themiron commented 6 years ago

Reuse exsisting radius functionality and allow set iterface name template for pppoe/pptp/l2tp, '%d' specification will be replaced automagically to the next available index by kernel. PPP interface rename allows to easy differ client's interfaces from the other ppp ones, for example, with just netfilter interface rules.

Example: [pptp] ifname=pptp%d will produce pptp0, pptp1, ...

xebd commented 6 years ago

did you test it ? it doesn't work properly for me first interface gets pppo0 name, but next raises error: [2017-12-14 16:53:10.588] ppp1: 4a2bbf1766bb8d1a: interface rename to pppoe%d failed: Resource temporarily unavailable and interfaces doesn't bring up

themiron commented 6 years ago

sure, I've test it, but with pptp & sstp, not pppoe, should be the same. let me recheck

themiron commented 6 years ago

fixed, see pull request #27. in case of wildcard rename kernel returns new index >= 0, but original error check was for non-zero only. that's why succesful rename was treated as false-negative.

xebd commented 6 years ago

ok thanks