Commit Graph

116 Commits

Author SHA1 Message Date
DL6ER 4bc4b6472d Don't use to lower case converted domain when determining status (OK, Pi-holed, ...)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-12-11 22:06:29 +01:00
DL6ER 1a0f051d8e Convert forward destinations, clients and domains to lower case
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-11-22 20:26:17 +01:00
DL6ER 0848420af4 Also test case insensitive against exact match of domain to wildcard
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-11-22 19:00:16 +01:00
DL6ER 174ce9e8eb Use case insensitive string comparison for wildcards
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-11-22 17:10:45 +01:00
DL6ER 84e92df597 Re-parse gravity data when receiving SIGHUP
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-10-25 17:45:09 +02:00
DL6ER ee355d0a88 Merge pull request #148 from pi-hole/new/RESOLVE_IPv4
Add RESOLVE_IPV4 config flag
2017-10-23 08:48:57 +02:00
DL6ER e939dad5ca Add RESOLVE_IPV4 config flag
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-10-21 16:25:24 +02:00
DL6ER cbeb6a241a Merge pull request #146 from pi-hole/fix/newyearissue
New year's issue
2017-10-11 18:29:27 +02:00
DL6ER 06efbdf5bb Merge pull request #134 from pi-hole/new/clientsovertime
[WIP] Add clients over time data structure
2017-10-10 19:06:20 +02:00
DL6ER 1adaa78584 Merge pull request #138 from pi-hole/tweak/IPv6resolverflag
Add RESOLVEIPV6 config flag
2017-10-10 19:05:22 +02:00
DL6ER 2c47ab55e2 dnsmasq's log output is lacking the year probably as a filesize reduction measure. That is irrelevant most of the year. However, every year we come to the point where a year ends and a new year starts. Here, the lack of the year *can* become problematic as we have to assume a year when converting dates into timestamps. Before this commit, FTL always assumed the current year to be the correct choice. That is true in all cases except one: FTL is restarted on Jan 01. It would then interpret the Dec 31 data if finds during log parrsing with this (instead of last) year which would be wrong.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-10-10 18:22:52 +02:00
DL6ER 7838ecf8d3 Detect and skip queries older than the ones before in the same log file
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-10-03 14:04:43 +02:00
DL6ER e5847f7ae6 Added RESOLVEIPV6 config flag + extended comments in source
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-09-30 15:17:13 +02:00
DL6ER 7a0ce6b2a2 Add overTime/clients data structure 2017-09-22 20:44:29 +02:00
DL6ER a16656e6d0 Remove actually too verbose new debug output
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-09-19 22:45:08 +02:00
DL6ER 93b0586d4f Ensure forward destinations are only count once when analyzing the "forwarded" lines, i.e. not when analyzing the "query" lines
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-09-19 22:40:38 +02:00
DL6ER 1fc9620065 Skip analysis of forward destination if query type is [PTR]
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-09-19 22:22:28 +02:00
DL6ER 33b5229c5e Add memory validation before trying to access client data
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-09-07 19:27:50 +02:00
DL6ER 64450206fa Remove old client host name string length from counter when storing new host name
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-09-07 17:05:41 +02:00
DL6ER 4f1cfe1264 Add reresolveHostnames() routine
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-09-06 16:59:35 +02:00
DL6ER 306af05c96 Don't add extra zeros at the very end of the output
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-08-06 19:23:04 +02:00
DL6ER ac259b82d6 Avoid accessing invalid time stamps at the very beginning of the log parsing
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-08-06 19:14:37 +02:00
DL6ER 797822e80e Ensure that data in overTime data struct in contiguous. Previously, we stored only timestamps for which we actually have found data. This may lead to uncertainties in plotting engines.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-08-06 18:38:48 +02:00
Mcat12 e9e4cd500f Merge branch 'development' into new/ignore_pi.hole 2017-08-01 09:17:14 -04:00
Mcat12 c74e8eb92f Ignore invalid domains (containing ")
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2017-07-29 19:11:38 -04:00
DL6ER c8314dec8b Skip queries with domain "pi.hole" during log parsing
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-07-20 20:22:45 +02:00
DL6ER 47fd38c7fc Try to open pihole.log a second time if failed first time 2017-06-28 17:15:42 +02:00
DL6ER 69bbbf5070 Skip entry if pointer is invalid (allocation of memory failed). Fixes #91 2017-06-19 19:59:36 +02:00
DL6ER 73734596eb Interpret black.list (status 5) 2017-06-17 14:08:45 +02:00
DL6ER 692d69947e Add FTL SQLite3 implementation, we compile SQLite3 on-the-fly to become independent of installed libraries
Limit DB filesize, configureable via config file, if set to zero, the DB functionality is disabled altogether
Add ">dbstats" to the telnet interface
2017-06-09 09:47:13 +02:00
DL6ER 2f0f68e4d5 Rework thread locks (since we don't need different kinds anymore) 2017-06-03 19:08:24 +02:00
DL6ER 81db618568 Added AAAA_QUERY_ANALYSIS config flag for skiping the analysis of AAAA records 2017-06-01 23:09:11 +02:00
DL6ER d4528e276c Second test has to be partbuffer, not part 2017-05-15 13:59:51 +02:00
DL6ER 78a393b1f5 Improve memory handling in int detectStatus(const char *domain) 2017-05-15 13:51:49 +02:00
DL6ER 2b3f9f9eb5 Add const qualifier to some char pointers. Also, remove strtok() as it manipulates the string we pass in and may lead to memory problems 2017-05-15 13:12:51 +02:00
DL6ER 50716ee5c2 strncat() NULL-terminates the copied string while strncpy() doesn't! 2017-05-15 12:13:02 +02:00
DL6ER dee1d5e386 in int getforwardID(char * str) we have to use str instead of readbuffer 2017-05-14 23:47:15 +02:00
DL6ER 6f6a729816 Simplified code that makes copies of read strings into FTL's internal data structure (no functional change) 2017-05-14 23:40:12 +02:00
DL6ER 5b24e47644 Add check for length of obtained forward string 2017-05-14 23:37:15 +02:00
DL6ER 9882e0b2ee Add check for length of obtained domain string 2017-05-14 23:35:47 +02:00
DL6ER 50b960206b Add check for length of obtained client string 2017-05-14 23:31:17 +02:00
DL6ER 01c9529864 Use strdup() and set hostname[0] explicitly to '\0' if no hostname is found in char *resolveHostname(char *addr) 2017-05-14 23:29:27 +02:00
DL6ER 2bbacbf1c2 Replace all fgets() calls by readline() to become independent of all existing line length limitations (#43) 2017-05-12 17:20:04 +02:00
DL6ER a19cf23102 Ignore log entries with "<name unprintable>" during log parsing. Fixes #22 2017-05-01 13:07:43 +02:00
DL6ER e4628eb097 Skip the analysis of too old queries in the logs altogether. By this, we can skip the initial GC run, since there will be nothing to be collected 2017-04-20 16:01:21 +02:00
DL6ER 9d225a976c Don't test magic byte if detected potential out-of-bounds error in memory validator 2017-04-18 17:45:00 +02:00
DL6ER 43433e0c28 Initialize overTime[].cached counter to zero on creation of new entry 2017-04-18 17:43:08 +02:00
DL6ER b724c8f0a6 Add local forward destination in forward destination data output 2017-04-18 17:34:51 +02:00
DL6ER b960ed50c9 Check memory struct size before trying to access it 2017-04-14 00:11:14 +02:00
DL6ER 882756a2ad Count wildcard blocked domains as blocked 2017-04-13 16:35:45 +02:00