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
DL6ER
89d44ffbbb
Add magic byte to each struct entry that is checked before accessing the variable - if the check fails, print a warning to the log file
2017-04-13 12:38:29 +02:00
DL6ER
9fc5426e8b
Increase verbosity of FTL's debug mode + add new memory access validation checker subroutine
2017-04-13 11:54:32 +02:00
DL6ER
b8f0e2fdc3
Parse time stamp earlier so that it is included in debug output of queries struct re-allocation
2017-04-12 10:33:06 +02:00
DL6ER
032bfc085c
Analyze and show file permissions for log files
2017-04-10 00:46:52 +02:00
DL6ER
66e8c72a4f
Enhance error messages
2017-04-09 22:53:08 +02:00
DL6ER
c7b3ddd2fe
Reduce polling of pihole.log from 20x per second to 5x per second
2017-04-09 22:43:38 +02:00
DL6ER
371b7a0f32
Use stat() and don't keep pihole.log open forever. Fixes #16
2017-04-09 20:41:25 +02:00
DL6ER
76f2039a2a
bzero is obsolete. Using memset instead
2017-04-08 23:46:33 +02:00
DL6ER
e7658076d1
Improve log messages in parser thread
2017-04-08 22:57:23 +02:00
DL6ER
8d9cd43f9d
More logging to syslog in case of critical errors
2017-04-08 22:28:34 +02:00
DL6ER
1985f8e6eb
Removed logg_str_str
2017-04-08 18:39:41 +02:00
DL6ER
16a788429b
Removed logg_str
2017-04-08 18:34:37 +02:00
DL6ER
ece9f18c1b
Removed logg_int
2017-04-08 18:27:56 +02:00
DL6ER
5c952f2cd6
Improve flexibility of log routines
2017-04-08 18:18:07 +02:00
DL6ER
2abc2caace
Make client and domain finding algorithms faster by skipping candidates that fail for a comparison of the very first character
2017-04-04 15:28:52 +02:00
DL6ER
baca4cbb26
Factor out client finding algorithm
2017-04-04 15:24:30 +02:00
DL6ER
7039b3db99
Factor out domain finding algorithm
2017-04-04 15:22:43 +02:00
DL6ER
ba058c1372
Increase verbosity of log file
2017-04-03 10:33:08 +02:00
DL6ER
d779673fa1
Re-parse all logs when receiving signal SIGUSR1
2017-04-02 23:59:49 +02:00
DL6ER
b5a28edccb
Debug mode: Print at which time query had to be enlarged (kind of log parsing process display for humongous logs
2017-04-02 22:57:23 +02:00
DL6ER
fa37f92e33
ftell returns long int (not unsigned)
2017-04-01 16:00:00 +02:00
DL6ER
e3b549e377
Improve code output
2017-03-31 14:17:21 +02:00
DL6ER
c49b406fcc
Calling backtrace inside a signal handler is (unfortunately) meaningless
2017-03-31 13:48:34 +02:00
DL6ER
3bcffa46f5
Improve log parser for pihole.log with file size > 4 GB
2017-03-30 00:53:58 +02:00
DL6ER
78f615201a
Some non-POSIX systems use different conventions for exit status values.
...
For greater portability, we now use the macros EXIT_SUCCESS and EXIT_FAILURE for the conventional status value for success and failure, respectively.
They are declared in stdlib.h
2017-03-29 14:00:51 +02:00
DL6ER
3dd09df9bf
Also print username if pihole.log cannot be read
2017-03-29 13:52:44 +02:00
DL6ER
f506c28724
Refine checkLogForChanges()
2017-03-29 11:18:48 +02:00