summaryrefslogtreecommitdiff
path: root/accel-pppd/lua
AgeCommit message (Collapse)Author
2018-10-26lua: make luasupp.h self-containedGuillaume Nault
We need to include "ap_session.h" to define 'struct ap_session'. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2018-10-23ipv6: fix IPv6 processing of sessions that only have only a link-local addressGuillaume Nault
Several modules assume that if ses->ipv6 is set, then ses->ipv6->addr_list contains at least one element. But this is not true if ipv6 was allocated by the pseudo ipdb backend of ipv6cp (ipv6cp_opt_intfid.c). That is, if the PPP session only has an automatic link-local address. This leads modules like pppd-compat and dhcpv6 to access invalid memory when trying to retrieve the IPv6 address of a PPP session. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2018-03-04fix possible null pointer dereferencesVladislav Grishenko
2017-10-17lua: implemented interface to extend session object by modulesDmitry Kozlov
to access module specific object introduced new function session:module(NAME)
2017-10-16lua: implemented "session" module that provides session object to be passed ↵Dmitry Kozlov
to lua scripts session object consists of following functions: ifname() - interface name ifindex() - interface ifindex sid() - Acct-Session-ID uptime() - session uptime in seconds username() ctrl_type() - type of session (pppt/pppoe/l2tp/ipoe) calling_sid() - Calling-Station-ID called_sid() - Called-Station-ID ipv4() - retuns pair (peer address, local address) ipv6() - ipv6 address or nil rx_bytes() tx_bytes()
2017-10-13improved lua supportDmitry Kozlov
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.