Hi,

We would like to modify the VLAN based on the SSID. Currently we have it
working by using the function in -/usr/local/pf/lib/pf/vlan/custom.pm. This
was working perfectly until we then decided we needed two different VLANs
depending on the connected SSID. I thought I could simply modify the script
with an elseif statement. Of course my script knowledge is poor and I ended
up breaking it so nothing would authenticate at all.

I could see this error in the Radius log:

Thu Apr 10 14:31:53 2014 : Error: rlm_perl: An error occurred while
processing the authorize SOAP request:  syntax error at line 1, column 49,
byte 49 at /usr/lib64/perl5/XML/Parser.pm line 187 a

So I'm assuming this was down to my script modification.

Would someone be able to have a quick look at let me know what I've done
wrong please:

custom.pm
--------
sub getNormalVlan {
my ($this, $switch, $ifIndex, $mac, $node_info, $connection_type,
$user_name, $ssid) = @_;
my $logger = Log::Log4perl->get_logger();

# custom example: VLAN by SSID
# # return customVlan1 if SSID is 'PacketFenceRocks'
        if (defined($ssid) && $ssid eq 'srguest') {
        return $switch->getVlanByName('externalGuest');
         } elseif (defined($ssid) && $ssid eq 'srsec') {
            return $switch->getVlanByName('secTeam');
           }

         return $switch->getVlanByName('default');

         }

----------
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to