DNS name lookups performed by Bro now also query AAAA records.

DNS_Mgr handles combining the results of the A and AAAA queries
for a given hostname such that at the scripting layer, the name
resolution can yield a set with both IPv4 and IPv6 addresses.
This commit is contained in:
Jon Siwek 2012-02-15 11:02:18 -06:00
parent 808f3915e5
commit 2ef18e98a2
2 changed files with 138 additions and 33 deletions

View file

@ -6,6 +6,7 @@
#include <list>
#include <map>
#include <queue>
#include <utility>
#include "util.h"
#include "BroList.h"
@ -106,6 +107,8 @@ protected:
void LoadCache(FILE* f);
void Save(FILE* f, PDict(DNS_Mapping)& m);
typedef map<string, pair<DNS_Mapping*, DNS_Mapping*> > HostMap;
void Save(FILE* f, const HostMap& m);
// Selects on the fd to see if there is an answer available (timeout
// is secs). Returns 0 on timeout, -1 on EINTR or other error, and 1
@ -133,7 +136,7 @@ protected:
PDict(ListVal) services;
PDict(DNS_Mapping) host_mappings;
HostMap host_mappings;
PDict(DNS_Mapping) addr_mappings;
DNS_mgr_request_list requests;