packetfence
packetfence copied to clipboard
Coovachilli template upgrade following radius issues
Hello,
Whenever I was trying to run Coovachilli as a controller, and PacketFence as a radius server, on a Layer 3 network, I noticed the user access was allowed 5 minutes after registration after many radius request failed.
After throubleshooting with my manager, we noted that the mac address sent by CoovaChilli was not the same format as the one on PacketFence and there were missing COA attributes.
This how we proceeded to solve it :
#Step1 :
Add attribute "ChilliSpot-Session-State" in the radius dictionnary "/usr/local/pf/lib/pf/util/radius_dictionary.pm" as following :
"ChilliSpot-OriginalURL" => "ChilliSpot",
"ChilliSpot-Session-State" => "ChilliSpot",
"ChilliSpot-UAM-Allowed" => "ChilliSpot",
14559 => {
[..] 9 => [ "ChilliSpot-OriginalURL", "string" ], 15 => [ "ChilliSpot-Session-State", "integer" ], 100 => [ "ChilliSpot-UAM-Allowed", "string" ],
14559 => { [..] "ChilliSpot-OriginalURL" => [ 9, "string" ], "ChilliSpot-Session-State" => [ 15, "integer" ], "ChilliSpot-UAM-Allowed" => [ 100, "string" ],
#Step2 : We've created a new file with this template "CoovaChilli.pm" inside : /usr/local/pf/lib/pf/Switch/Kleegroup/CoovaChilli.pm Where we use the below function to transform mac address to the expected format.
my $macEUI48 = uc($mac);
$macEUI48 =~ s/:/-/g;
Based on pica8 fork, we've adjusted configurations ( function "radiusDisconnect" modified ... ) to make radius coa disconnect work.
Please find attached CoovaChilli.pm and radius_dictionnary.pm files.
CoovaChilli.pm.pdf radius_dictionary.pm.pdf
Now it works fine, Could you please implement this in next PacketFence Ugrade ? Thanks a lot