Page 1 of 1

Accel-ppp not load file lua

Posted: 06 Feb 2019, 14:33
by rodrigoselau
Hello,
I have the following problem at the time of loading the lua ... file in the log emerg.log displays the following error

ipoe: unknown username value 'lua:username'



Thanks in advance.
Rodrigo

Re: Accel-ppp not load file lua

Posted: 06 Feb 2019, 16:53
by dimka88
Hi, I think function "username" in you lua file return a zero value. Show me from acel-ppp.conf section [ipoe] and lua file

Re: Accel-ppp not load file lua

Posted: 06 Feb 2019, 17:07
by rodrigoselau

Code: Select all

[ipoe]
verbose=5
unit-cache=0
username=lua:username
lua-file=/etc/accel-ppp.lua
max-lease-time=120
lease-time=300
renew-time=300
attr-dhcp-client-ip=DHCP-Client-IP-Address
attr-dhcp-router-ip=DHCP-Router-IP-Address
gw-ip-address=172.19.2.62
proxy-arp=1
#interface=re:eth0\.1310\.([1-9]|[1-9][0-9][0-9]|[1-4][0-9][0-9][0-9]),mode=L2,shared=0,start=dhcpv4,ifcfg=1,ipv6=0
#vlan-mon=eth0.1310,1-4095
#vlan-timeout=60
interface=eth1.1310,mode=L2,shared=1,start=dhcpv4,ifcfg=1,ipv6=0
attr-dhcp-opt82=DHCP-Option82

Code: Select all

function username(pkt)
       acid=pkt:agent_circuit_id()
        if(string.sub(acid, 5, 5) ~= "-") then
                modAcid=string.sub(acid, 0, 4) .. "-" .. string.sub(acid, 5)
                return modAcid
        else
                return acid
        end
end

Re: Accel-ppp not load file lua

Posted: 06 Feb 2019, 17:09
by dimka88
Sorry, accel return this error if you don`t build accel with lua support.
Build accel-ppp again and add to cmake

Code: Select all

cmake ... -DLUA=TRUE
ps:// docs how buil accel-ppp on debian https://accel-ppp.org/wiki/doku.php?id= ... ion_debian