mirror of
				https://github.com/maride/pancap.git
				synced 2025-10-10 19:36:51 +00:00 
			
		
		
		
	Check for doubles before adding IP addresses to DNS answer list
This commit is contained in:
		
							parent
							
								
									ad532a5a22
								
							
						
					
					
						commit
						a368f18915
					
				| @ -54,9 +54,9 @@ func processDNSAnswer(answers []layers.DNSResourceRecord) { | ||||
| 		if answer.Type == layers.DNSTypeA { | ||||
| 			// A record, check IP for being private | ||||
| 			if ipIsPrivate(answer.IP) { | ||||
| 				answerPrivateIPv4 = append(answerPrivateIPv4, answer.IP.String()) | ||||
| 				answerPrivateIPv4 = common.AppendIfUnique(answer.IP.String(), answerPrivateIPv4) | ||||
| 			} else { | ||||
| 				answerPublicIPv4 = append(answerPublicIPv4, answer.IP.String()) | ||||
| 				answerPublicIPv4 = common.AppendIfUnique(answer.IP.String(), answerPublicIPv4) | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user