PacketFence
Bug Tracking System

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001789PacketFenceradiuspublic2014-04-28 18:262014-05-07 08:30
Reportervictor 
Assigned Tofdurand 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformAllOSAllOS VersionAll
Product Version 
Target VersionFixed in Version 
Summary0001789: Unable extract SSID on Cisco 1142
Description
Cisco 1142 apparently sends multiple Cisco-AVPair records back to the radius server and trips over extractSsid sub.

tail -f logs/packetfence.log

Apr 28 08:13:46 pf::WebAPI(4307) INFO: Unable to extract SSID of Cisco-AVPair: ARRAY(0xbaf6fcc8) (pf::SNMP::Cisco::Aironet::extractSsid)


Output from /usr/sbin/radiusd -X -d /usr/local/pf/raddb/

        Cisco-AVPair = "ssid=TEST"
        Service-Type = Login-User
        Cisco-AVPair = "service-type=Login"




As a quick workaround I changed $radius_request->{'Cisco-AVPair'} into $radius_request->{'Cisco-AVPair'}[0] but a permanent fix should be better than that.
TagsNo tags attached.
fixed in git revision
fixed in mtn revision
Attached Filespatch file icon extractSsid.patch [^] (978 bytes) 2014-05-05 14:49 [Show Content]

- Relationships

-  Notes
(0003532)
victor (reporter)
2014-05-05 14:42

Take a look at the patch below. extractSsid should be able to go through multiple Cisco-AVPair records to find the ssid.



--- packetfence-4.1.0/lib/pf/SNMP/Cisco/Aironet.pm 2013-12-11 12:40:14.000000000 -0700
+++ ../lib/pf/SNMP/Cisco/Aironet.pm 2014-05-05 06:27:44.115673527 -0600
@@ -203,11 +203,14 @@
     my $logger = Log::Log4perl::get_logger(ref($this));

     if (defined($radius_request->{'Cisco-AVPair'})) {
-
- if ($radius_request->{'Cisco-AVPair'} =~ /^ssid=(.*)$/) { # ex: Cisco-AVPair = "ssid=PacketFence-Secure"
- return $1;
- } else {
- $logger->info("Unable to extract SSID of Cisco-AVPair: ".$radius_request->{'Cisco-AVPair'});
+ foreach my $ciscoAVPair (@{$radius_request->{'Cisco-AVPair'}}) {
+ $logger->trace("Cisco-AVPair: ".$ciscoAVPair);
+
+ if ($ciscoAVPair =~ /^ssid=(.*)$/) { # ex: Cisco-AVPair = "ssid=PacketFence-Secure"
+ return $1;
+ } else {
+ $logger->info("Unable to extract SSID of Cisco-AVPair: ".$ciscoAVPair);
+ }
         }
     }
(0003533)
victor (reporter)
2014-05-05 14:49

Copy-paste seems to wrecked formatting. The patch file is attached.
(0003535)
fdurand (administrator)
2014-05-06 08:18

Hello Victor,

your patch has been included in the devel version so it will be available for the incoming 4.2 version.

https://github.com/inverse-inc/packetfence/commit/60a7e01bd0d20d0873e253b018ec19f260eeceab [^]

Fabrice
(0003537)
fdurand (administrator)
2014-05-07 08:30

Available in pf 4.2 release

- Issue History
Date Modified Username Field Change
2014-04-28 18:26 victor New Issue
2014-05-05 14:42 victor Note Added: 0003532
2014-05-05 14:49 victor Note Added: 0003533
2014-05-05 14:49 victor File Added: extractSsid.patch
2014-05-06 08:18 fdurand Note Added: 0003535
2014-05-07 08:30 fdurand Note Added: 0003537
2014-05-07 08:30 fdurand Status new => resolved
2014-05-07 08:30 fdurand Resolution open => fixed
2014-05-07 08:30 fdurand Assigned To => fdurand


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker