I noticed that my laptop, after adding a second VLAN, was now not getting
it's port set correctly because the Extreme switch I'm using reports the MAC
twice in the forwarding table (fdb). I dropped in a function to strip dupes
out of the array, put and implemented it in the handler function and this has
resolved the issue. Here's the diff.
1551c1551,1553
< @macArray = @tmpMacArray;
---
> # Remove duplicate MAC addresses - dgr...@ctdummy.com
> @macArray = uniq(@tmpMacArray);
>
1556a1559
> my $i;
1557a1561,1563
> for($i=0;$i < scalar(@macArray);$i=$i+1){
> $logger->info("MAC($i): $macArray[$i]")
> }
2089a2096,2112
> # Quick function to strip duplicates from an array.
> # Grabbed from
> "http://stackoverflow.com/questions/7651/how-do-i-remove-duplicate-items-from-an-array-in-perl"
> # -- dgreer@ctdummy
> sub uniq {
> my %seen = ();
> my @r = ();
> foreach my $a (@_) {
> unless ($seen{$a}) {
> push @r, $a;
> $seen{$a} = 1;
> }
> }
> return @r;
> }
>
>
>
Don
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
PacketFence-devel mailing list
PacketFence-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/packetfence-devel