ipoe start=up mac

IPoE related questions
Post Reply
deneeska
Posts: 1
Joined: 18 May 2020, 12:55

ipoe start=up mac

Post by deneeska »

Добрый день.

Подскажите, а как передать радиусу User-Name= mac при старте по неклассифицированному пакету?
мак приезжает в Calling-Station-Id, но не хочется курочить биллинг.

Проблема - abills при User-Name=ip возвращает authentication succeeded даже если ip нет у пользователя.
И пользователь постоянно долбится на accel.
dimka88
Posts: 866
Joined: 13 Oct 2014, 05:51
Contact:

Re: ipoe start=up mac

Post by dimka88 »

Добрый день, возможно через LUA

Code: Select all

[ipoe]
lua-file=/etc/accel-ppp/ipoe.lua
username=lua:if_mac
Создать /etc/accel-ppp/ipoe.lua со следующим содержанием

Code: Select all

#!lua
  function if_mac(pkt)
    return pkt:hdr('chaddr')
end
slima
Posts: 6
Joined: 16 Nov 2020, 11:42

Re: ipoe start=up mac

Post by slima »

Hi, I have the same problem.

When session start by start=dhcpv4
above lua script is working, but when start by start=up
pkt:hdr('chaddr') is empty.

There is a way to put mac as username from start unclassified packet?
hashbang
Posts: 135
Joined: 12 Jul 2015, 10:28

Re: ipoe start=up mac

Post by hashbang »

hi,
Anyupdate on this ?
dimka88
Posts: 866
Joined: 13 Oct 2014, 05:51
Contact:

Re: ipoe start=up mac

Post by dimka88 »

Hi folks, as you know, these filds getting from DHCP packets headers. To get HWADDR from any packet try to use pkt:hwaddr()

Code: Select all

#!lua
  function if_mac(pkt)
    return pkt:hwaddr()
end
It is described here https://accel-ppp.readthedocs.io/en/lat ... a-examples
hdr(name)
Will return value which contained in DHCP packet header. name may receive next params: xid, ciaddr, giaddr, chaddr.
Post Reply