Hi again.

I was using v1.87 and had everything working well using a guest by
default config in the custom.pm.

I added

sub custom_getCorrectVlan {

     my ( $this, $switch_ip, $ifIndex, $mac, $status, $vlan, $pid ) =
@_;

 

     # $vlan represents the node's VLAN

     return ($vlan);

}

And this worked pretty well.

 

I then upgraded to v1.90 and this script no longer works at all. Going
through the release notes I noticed that there are some changes that
could explain why this no longer works. What happens is now is no matter
what kind of node, registered or unregistered, vlan defined or not, a
switchport will flip to the registration VLAN and stay there no matter
what gets plugged in next.

 

"- lib/pf/vlan.pm interface changed

    If you built a customized version of vlan.pm in
lib/pf/vlan/custom.pm be 

    aware that the parameters expected by vlan_determine_for_node() and 

    custom_getCorrectVlan() changed. Instead of the switch's IP, a
switch 

    object (pf::SNMP) is expected. Also, the whole node_info is passed
to 

    custom_getCorrectVlan() instead of scalars of node_info's content."

 

What I would ultimately like to do is have the script do the following.

 

If node is registered and Alternate dest. VLAN ('vlan' in the DB table)
is not null, use value for 'vlan' that is in the DB table for that node.

else

If node is registered and Alternate dest. VLAN  is null use normalVLAN

else

If node is unregistered use registrationVLAN

 

Any insight on how I can do this here or if it is even possible would be
greatly appreciated. Admittedly, I am kind of lost with the coding for
it.

 

Thanks,

Kurt

 

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Packetfence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to