Code: Select all
cmake -DBUILD_IPOE_DRIVER=TRUE -DBUILD_VLAN_MON_DRIVER=TRUE -DCMAKE_INSTALL_PREFIX=/usr -DKDIR=/usr/src/linux-headers-`uname -r` -DLUA=TRUE -DSHAPER=TRUE -DRADIUS=TRUE -DNETSNMP=TRUE -DCPACK_TYPE=Debian7 ..
-- The C compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- 'x86_64'
-- Found Lua51: /usr/lib/x86_64-linux-gnu/liblua5.1.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "5.1.5")
-- Looking for timerfd_create
-- Looking for timerfd_create - found
-- Looking for linux/netfilter/ipset/ip_set.h
-- Looking for linux/netfilter/ipset/ip_set.h - found
-- Looking for setns
-- Looking for setns - not found
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/accel-ppp-code/build
Code: Select all
[ipoe]
lua-file=/etc/accel-ppp.lua
verbose=1
ipv6=0
username=ifname
password=csid
lease-time=600
max-lease-time=3600
interface=re:^vlan209\.$,username=lua:get_hostname,mode=L2,shared=0,start=dhcpv4,mtu=1500,ifcfg=1,check-mac-change=1
vlan-mon=re:^vlan209,1111-1888
vlan-timeout=600
vlan-name=%I.%N
Code: Select all
cat /etc/accel-ppp.lua
#!lua
function get_hostname(pkt)
-- local name = pkt.option(12)
-- if (string.len(name) < 1) then
-- name = pkt.ifname()
-- end
-- return name
return "user"
end
Where i make mistake?[2021-09-23 13:04:38]: info: ipoe: create vlan vlan.209.1121 parent vlan.209
[2021-09-23 13:04:38]: error: ipoe: unknown username value 'lua:get_hostname'
[2021-09-23 13:04:38]: info: ipoe: start interface vlan.209.1121 (username=lua:username_func,mode=L2,shared=0,start=dhcpv4,mtu=1500,ifcfg=1,check-mac-change=1)