help-gnu-radius
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gnu-radius] A rewrite procedure for PPPoE/PPTP/L2TP over 802.1q tr


From: Sergey Poznyakoff
Subject: [Help-gnu-radius] A rewrite procedure for PPPoE/PPTP/L2TP over 802.1q trunc.
Date: Tue, 22 Jul 2003 21:41:34 +0300

------- Forwarded message by "Oleg Gawriloff" <address@hidden> 

Hello, Sergey!
You wrote to "Oleg Gawriloff" <address@hidden> on Tue, 22 Jul 2003
16:11:00 +0300:

 ??>> Some further investigation shows that all users have equal
 ??>> NAS-Port-Id.

 SP> That's it! Each consecutive record overwrites the previous one having
 SP> the same (NAS-IP-Address,NAS-Port-Id) pair.

OK. Here's small rewrite that may be handy for all users using any cisco NAS
with PPPoE/PPTP/L2TP tunnels over 802.1q trunk. It maps Acct-Session-Id,
which is the only attribute (except timestamp) unique between NAS reboots,
to NAS-Port-Id.

integer
c3620_decode(string P)
{
        integer tmp,len,port;
        tmp=index(P,95)+1;
        len=length(P);
        port=decimal(substr(P,tmp,len-tmp));
        logit("c3620_decode: " + P + "->" + (string)tmp + "->" +(string)len
+ "->" +(string)port);
        return port;
}

integer
c3620_fixup()
{
        %[Orig-NAS-Port-Id]=%[NAS-Port-Id];
        %[NAS-Port-Id]=c3620_decode(%[Acct-Session-Id]);
        logit("c3620_fixup: " + (string)%[NAS-Port-Id]);
        return 0;
}


np: none

With best regards, Oleg Gawriloff.



------- End of Forwarded message





reply via email to

[Prev in Thread] Current Thread [Next in Thread]