Improve logging of DNS record source from --hostsdir files.

Patch author Dominik Derigs <dl6er@dl6er.de> with subsequent bugfixes
and tweaks from Simon Kelley.
This commit is contained in:
Dominik Derigs
2022-10-16 21:08:30 +01:00
committed by Simon Kelley
parent a176cf1bc3
commit 0ba25a0512
4 changed files with 119 additions and 65 deletions

View File

@@ -687,10 +687,17 @@ struct hostsfile {
struct hostsfile *next;
int flags;
char *fname;
unsigned int index; /* matches to cache entries for logging */
};
struct dyndir {
struct dyndir *next;
struct hostsfile *files;
int flags;
char *dname;
#ifdef HAVE_INOTIFY
int wd; /* inotify watch descriptor */
#endif
unsigned int index; /* matches to cache entries for logging */
};
/* packet-dump flags */
@@ -1152,6 +1159,7 @@ extern struct daemon {
u32 umbrella_org;
u32 umbrella_asset;
u8 umbrella_device[8];
int host_index;
struct hostsfile *addn_hosts;
struct dhcp_context *dhcp, *dhcp6;
struct ra_interface *ra_interfaces;
@@ -1172,7 +1180,8 @@ extern struct daemon {
int doing_ra, doing_dhcp6;
struct dhcp_netid_list *dhcp_ignore, *dhcp_ignore_names, *dhcp_gen_names;
struct dhcp_netid_list *force_broadcast, *bootp_dynamic;
struct hostsfile *dhcp_hosts_file, *dhcp_opts_file, *dynamic_dirs;
struct hostsfile *dhcp_hosts_file, *dhcp_opts_file;
struct dyndir *dynamic_dirs;
int dhcp_max, tftp_max, tftp_mtu;
int dhcp_server_port, dhcp_client_port;
int start_tftp_port, end_tftp_port;