DL6ER
7a1d037709
Remove obsolete variables
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-05-19 17:25:54 +02:00
DL6ER
b6dd8ec47f
Implement reading regex from file
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-05-19 17:21:56 +02:00
DL6ER
706b50057a
Explicitly test for != 0 to minimize changes to the code
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-05-03 18:51:57 +02:00
DL6ER
8c913033d9
Don't terminate FTL when invoked from a user != pihole. It seems we might want to run pihole-FTL as root on OSes that (for whatever reason) cannot use setcap
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-05-03 18:47:19 +02:00
DL6ER
76924b9425
Merge pull request #260 from pi-hole/new/regex
...
Add regex blocking support to FTLDNS
2018-04-29 17:57:09 +02:00
DL6ER
2f6e24045f
Add regex blocking support
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-04-24 17:22:17 +02:00
DL6ER
959af6789b
Remove -DNO_FORK compile time flag, undo dnsmasq code modifications, make sure that "-k" is always passed to dnsmasq
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-04-19 07:32:40 +02:00
DL6ER
daf80ee287
Remove atexit() hook as it is part of the plan that the FTL process calls exit() while going into daemon mode
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-03-18 15:24:15 +01:00
DL6ER
f267bf1eb2
Allow running as root in debugger (otherwise we are not able to bind to port 53), add atexit log function, relocate FTL forking hook to not skip forking in debug mode
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-02-25 09:20:32 +01:00
DL6ER
74c8a19d5f
Re-enable SIGINT and SIGSEGV handler. All other signals are handled by the resolver code
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-02-25 00:06:12 +01:00
DL6ER
39f46e38ac
Fix suggested sudo command
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-02-24 18:27:22 +01:00
DL6ER
f9405903c5
Fork only after DNS / DHCP ports have been bound to be able to pass such error messages to "service status", also don't allow users to start pihole-FTL as root (must be run with user pihole)
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-02-24 15:27:09 +01:00
DL6ER
ea3309e7b1
Initial commit for FTLDNS
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-02-22 20:21:06 +01:00
DL6ER
6ccd43c648
Merge pull request #211 from pi-hole/tweak/no_pihole.log.1
...
Don't read pihole.log.1
2018-01-22 08:01:13 +01:00
Mcat12
590f1f97f7
Merge remote-tracking branch 'origin/development' into new/API
...
# Conflicts:
# FTL.h
# socket.c
2018-01-21 09:48:41 -05:00
DL6ER
6da7c01f42
Remove "TIMEFRAME" option
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-21 14:57:04 +01:00
DL6ER
d12726a01b
Only listen on IPv4 and IPv6 telnet sockets if we successfully bound to the corresponding port
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-21 14:01:22 +01:00
DL6ER
996689fb45
Remove sleep from main()
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-20 21:42:00 +01:00
Mcat12
232507a51e
Merge remote-tracking branch 'origin/development' into new/API
2018-01-20 11:21:36 -05:00
DL6ER
b58731d9f3
Import queries from long-term database (if available) on startup of FTL. Fall back to log interpretation if database is not available
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-20 14:03:41 +01:00
DL6ER
a54f563450
Only save to database when it is available
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-16 08:18:27 +01:00
DL6ER
5704d72c1d
Add timers
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-15 23:13:12 +01:00
DL6ER
98efb8dcd9
Save remaining queries to long-term database on exit
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-15 22:54:17 +01:00
Mcat12
d3d70983ad
Merge remote-tracking branch 'origin/development' into new/API
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
# Conflicts:
# main.c
# request.c
# routines.h
# socket.c
2018-01-14 17:48:37 -05:00
DL6ER
3bdf7c9844
Make sure sockets are created and bound to before continuing to launch other threads in main()
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-14 20:00:24 +01:00
Mcat12
0013edb1c6
Merge remote-tracking branch 'origin/development' into new/API
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
# Conflicts:
# main.c
# request.c
# routines.h
# socket.c
2018-01-12 17:12:08 -05:00
DL6ER
c6b23ffa15
Complete re-write of this feature. We create now two sockets (one for IPv4-only and one for IPv6-only) to be able to bind to the corresponding loopback interfaces. We listen independently, but handle incoming requests using the same code.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-10 18:02:45 +01:00
Mcat12
595ab259ca
Remove HTTP API specific code so it can be replaced with a new protocol
...
Adjusted tests to fit the current lack of output on the unix socket.
Added TELNET enum and used it in place of the old SOCKET to better fit
with the rest of the code base.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-01-03 20:16:50 -05:00
Mcat12
8adb3d335e
Merge remote-tracking branch 'origin/development' into new/API
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-01-03 14:35:42 -05:00
DL6ER
8a720b6f19
Fix spelling
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-01 17:24:54 +01:00
DL6ER
54487db5cf
Close unix socket and unlink file handle on exit of FTL
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-01 11:59:43 +01:00
DL6ER
3c39cb1fd2
Added Unix socket - it is listening!
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-12-31 22:44:08 +01:00
DL6ER
e4cbe417a1
Rename existing telnet socket functions to contain "telnet" in their names to avoid confusion when adding Unix sockets
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-12-31 22:25:27 +01:00
Mcat12
604ad7ec39
Merge remote-tracking branch 'origin/development' into new/API
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
# Conflicts:
# request.c
# test/test_suite.sh
2017-12-22 23:08:18 -05:00
DL6ER
8035d9f5a4
Save only complete queries into the database
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-12-22 12:31:08 +01:00
DL6ER
24e4f6f8a9
Display counter information after re-reading the log file (received SIGHUP)
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-12-21 15:48:04 +01:00
DL6ER
06b9e025de
Make interval in which FTL stores queries in the long term database easily adjustable via the config file.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-12-12 18:40:32 +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
Mcat12
e5c4d19aaa
Merge remote-tracking branch 'origin/development' into new/API
2017-09-26 00:37:38 -04:00
DL6ER
4f1cfe1264
Add reresolveHostnames() routine
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-09-06 16:59:35 +02:00
Mcat12
c9de13b492
Merge remote-tracking branch 'origin/development' into new/API
2017-07-17 22:13:12 -04:00
DL6ER
952024107f
Improve crash message
2017-07-07 17:55:29 +02:00
DL6ER
d8d526aff3
Use low-level mutex locks to ensure FTLs main datastructure can only be accessed by one thread at a time.
2017-07-01 18:39:19 +02:00
DL6ER
0dfb855605
Merge branch 'development' into new/API
...
Conflicts:
request.c
2017-06-26 16:08:38 +02:00
DL6ER
01dc64cea4
Refactor DB thread to run exclusively either saving queries into the DB *or* deleting old queries (i.e. every hour at minute 59 no queries will be saved to the DB, but instead, two minutes of data will be saved at the full hour)
2017-06-22 23:14:13 +02:00
DL6ER
685f4f4218
Specify fixed age of queries until they get deleted and remove VACUUM instructions.
2017-06-19 19:20:30 +02:00
DL6ER
f84b461f3a
Add a small delay when starting the threads
2017-06-12 20:23:14 +02:00
DL6ER
38c706d3ce
Merge branch 'development' into new/API
2017-06-12 18:55:12 +02:00
DL6ER
abc550375b
Merge pull request #70 from pi-hole/new/db
...
Long-term database backend implementation
2017-06-12 18:54:52 +02:00
DL6ER
941dfb2493
Implement HTTP server into FTL, listening on port 4747 by default
2017-06-12 18:52:08 +02:00