Age | Commit message (Collapse) | Author |
|
|
|
example function to use mac address as username:
function username(ses)
return ses:hwaddr()
end
|
|
Implemented support for lua 5.2/5.3.
To build accel-ppp with exact lua version pass it in -DLUA=x.y, for example -DLUA=5.2 (cmake 3.0 is required for this).
Old style -DLUA=TRUE supports only 5.1 and does not require cmake 3.0.
Also extra lua modules (lua_lpack, lua_bit) took out into separated library luasupp.
|
|
Included bitop library http://bitop.luajit.org/index.html
It may be used to extract vlan components in username function:
function username(ses)
vid=ses:vlan()
svid=bit.rshift(vid,16)
cvid=bit.band(vid,0xffff)
...
end
|
|
This reverts commit b72efa378b32980f2114bcb8081fafbd93096aa0.
|
|
|
|
resulting value is vlan | (parent_vlan << 16)
|
|
|
|
[ipoe]
vlan-name=lua:make_vlan_name
lua function accepts three arguments: parent interface name, parent vlan number and vlan number caused vlan creation
sample lua function:
function make_vlan_name(ifname, svid, cvid)
print('make_vlan_name: '..ifname..','..svid..','..cvid)
return ifname..'.'..cvid
end
|
|
|
|
|
|
|
|
Wait for previous session completely terminated before continuing authorization new session.
|
|
Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
|
|
|
|
|
|
|
|
|