Fix regexp for HP switches
This commit is contained in:
		
				
					committed by
					
						
						Jeroen van Ingen
					
				
			
			
				
	
			
			
			
						parent
						
							31e4d20978
						
					
				
				
					commit
					447bb32f33
				
			@@ -760,9 +760,8 @@ sub store_neighbors {
 | 
			
		||||
              # on default vlan for HP switches remote_ip looks like
 | 
			
		||||
              # "myswitchname(012345-012345)"
 | 
			
		||||
              if (!defined $neigh) {
 | 
			
		||||
                  (my $tmpid = $remote_id) =~ s/.([0-9a-f]{6})-([0-9a-f]{6})./$1$2/;
 | 
			
		||||
                  (my $tmpid = $remote_id) =~ s/.*\(([0-9a-f]{6})-([0-9a-f]{6})\).*/$1$2/;
 | 
			
		||||
                  my $mac = NetAddr::MAC->new(mac => $tmpid);
 | 
			
		||||
 | 
			
		||||
                  if ($mac and not $mac->errstr) {
 | 
			
		||||
                      info sprintf
 | 
			
		||||
                        '[%s] neigh - found neighbor %s by MAC %s',
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user