Accel-ppp not load file lua

IPoE related questions
Post Reply
rodrigoselau
Posts: 15
Joined: 13 Nov 2018, 12:32

Accel-ppp not load file lua

Post 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
dimka88
Posts: 866
Joined: 13 Oct 2014, 05:51
Contact:

Re: Accel-ppp not load file lua

Post 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
rodrigoselau
Posts: 15
Joined: 13 Nov 2018, 12:32

Re: Accel-ppp not load file lua

Post 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
dimka88
Posts: 866
Joined: 13 Oct 2014, 05:51
Contact:

Re: Accel-ppp not load file lua

Post 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
Post Reply