Hello,

in our testing, we are trying to extend beyond customvlan_5.  However, it seems 
to be a hardcoded limit throughout - ie
it appears in at least pfcmd.pm, pfcmd_pregrammar.pm, SNMP.pm, SwitchFactory.pm.

Is this a design issue with PacketFence?  We've tried extending 
custom_getCorrectVlan and the ui.configs but it returns:
Oct 18 15:23:50 pfsetvlan(3) INFO: 1 MAC: 00:12:79:a1:a0:c2, PID: 1, Status: 
reg, Category: Prod2 VLAN:
(pf::vlan::vlan_determine_for_node)
Oct 18 15:23:50 pfsetvlan(3) WARN: new VLAN  is not a managed VLAN -> replacing 
VLAN  with MAC detection VLAN 3334
(pf::SNMP::setVlan)


This is the bit of code which should return our custom VLAN7.  The 
switches.conf contains the referenced vlans and using
the pfcmd_vlan we can successfully set the vlan.

Any suggestions would be neat.

# is switch object correct?
     my $valid_switch_object = (defined($switch) && ref($switch) && 
$switch->isa('pf::SNMP'));
     if ($valid_switch_object) {

         $logger->warn("Inside IF 1");

          # exemple of VLAN assignment based on node category using 
switches.conf's custom VLANs
         if (ref($node_info) eq 'HASH' && defined($node_info->{'category'})) {

         $logger->warn("Inside IF 2");

             my $category = lc($node_info->{'category'});
             if ($category eq 'prod2') {

         $logger->warn("Inside IF 3");

                 $logger->warn("vlan is " . $switch->{_customVlan7});
                 return $switch->{_customVlan7};
             } elsif ($category eq 'guests') {
                 return $switch->{_guestVlan};
             }
         }

         # return switch-specific normal vlan or default normal vlan (if 
switch-specific normal vlan not defined)
         return $switch->{_normalVlan};
     }



Regards,
Kerry.




.---------------------------------------.
.- Kerry Milestone  ---  Networks Team -.
.- The Wellcome Trust Sanger Institute -.
.-                                     -.
.- [email protected]                    -.
.- +44 (0)1223 834244 x2320            -.
-----------------------------------------


-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Packetfence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to