Problem with rlm_perl
Dear Folks, I'm using a perl module to record and save clients MAC address to DB. In situations that cisco-av-pair is not included in RADIUS packet, I'm replacing it with 0000.0000.0000. Everything is working just fine in test environment but when running on production servers the recorded MAC address for those clients without cisco-av-pair attribute in their packet is not 0000.0000.0000 but it's a wrong MAC which belongs to another packet received seconds ago. We even captured all the RADIUS traffic sent form NASes and replayed it in our test environment but I wanted to capture users mac address, so I've added a perl module , and after parsing cisco-av-pair attribute , I save it to DB. In normal situation everything works like a charm , but in some cases, If NAS doesn't send mac-address attribute, I expect to save a 0000.0000.0000 mac address in DB , but no success. There is a condition that I check if mac-address attribute exists in request or not, if exist it's ok , if not it should update request with a 0000.0000.0000 mac address.
Nasser Heidari wrote:
I wanted to capture users mac address, so I've added a perl module , and after parsing cisco-av-pair attribute , I save it to DB. In normal situation everything works like a charm , but in some cases, If NAS doesn't send mac-address attribute, I expect to save a 0000.0000.0000 mac address in DB , but no success. There is a condition that I check if mac-address attribute exists in request or not, if exist it's ok , if not it should update request with a 0000.0000.0000 mac address.
This can be done in the Perl script. Just check if the attribute exists in the request hash. Alan DeKok.
I've done it in test environment , problem is that same configuration is not working in heavy load. If NAS does not send MAC address , I update request with a 0000.0000.0000 mac , but in production environment, users who does not have mac address , RADIUS request updates with a wrong MAC that belongs to another user ! Do you have any idea?
-----Original Message----- From: freeradius-users-bounces+nasser=rasana.net@lists.freeradius.org
[mailto:freeradius-users-bounces+nasser=rasana.net@lists.freeradius.org] On
Behalf Of Alan DeKok Sent: Friday, September 03, 2010 18:20 To: FreeRadius users mailing list Subject: Re: Problem with rlm_perl
Nasser Heidari wrote:
I wanted to capture users mac address, so I've added a perl module , and after parsing cisco-av-pair attribute , I save it to DB. In normal situation everything works like a charm , but in some cases, If NAS doesn't send mac-address attribute, I expect to save a 0000.0000.0000 mac address in DB , but no success. There is a condition that I check if mac-address attribute exists in request or not, if exist it's ok , if not it should update request with a 0000.0000.0000 mac address.
This can be done in the Perl script. Just check if the attribute exists in the request hash.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Nasser Heidari wrote:
I've done it in test environment , problem is that same configuration is not working in heavy load. If NAS does not send MAC address , I update request with a 0000.0000.0000 mac , but in production environment, users who does not have mac address , RADIUS request updates with a wrong MAC that belongs to another user ! Do you have any idea?
No. It looks like a threading issue, but I'm not sure why. Alan DeKok.
participants (2)
-
Alan DeKok -
Nasser Heidari