rlm_perl RAD_REQUEST

Derek Wuelfrath dwuelfrath at inverse.ca
Thu Feb 21 22:31:15 CET 2013


EHLO list!

We're running into a strange issue here and would like the input of the 
FreeRADIUS community.
Using rlm_perl with our own perl module for post_auth, everything is 
running smoothly until, for an unknown reason, it looks like the 
RAD_REQUEST hash is becoming "empty".

Here's a snippet of the module (the important part for this particular 
issue).
our (%RAD_REQUEST, %RAD_REPLY, %RAD_CHECK);
sub post_auth {
     my $mac = clean_mac($RAD_REQUEST{'Calling-Station-Id'});

     if (length($mac) != 17) {
         &radiusd::radlog(L_INFO, "MAC address is empty or invalid in 
this request. "
             . "It could be normal on certain radius calls");
         &radiusd::radlog(L_INFO, "Our values. 
RAD_REQUEST-CallingStationId:" . $RAD_REQUEST{'Calling-Station-Id'} . " 
| MAC after clean_mac:" . $mac);
         return RLM_MODULE_OK;
     }

     ...
}

Here's the output when the issue occurs.
Info: rlm_perl: MAC address is empty or invalid in this request. It 
could be normal on certain radius calls
Info: rlm_perl: Our values. RAD_REQUEST-CallingStationId: | MAC after 
clean_mac:0

(The clean_mac thing is a method in our libraries that sanitize the MAC 
address itself... shouldn't have any incidence here)

Any insight ? Somewhere to look ?

Thanks!

Derek

-- 
dwuelfrath at inverse.ca :: +1.514.447.4918 (x110) :: www.inverse.ca
Inverse inc. :: Leaders behind SOGo (www.sogo.nu) and PacketFence (www.packetfence.org)



More information about the Freeradius-Users mailing list