Commit Graph
79 Commits
Author SHA1 Message Date
DL6ER 7714b8559f Merge branch 'development' into new/network-details
Signed-off-by: DL6ER <dl6er@dl6er.de>

Conflicts:
	Makefile
	routines.h
2019-01-06 20:18:29 +01:00
Mark Drobnak b07b12012a Merge pull request #453 from pi-hole/new/capabilities_check
Add check for required Linux capabilities
2019-01-04 15:21:53 -05:00
DL6ER 070feb630a Add check for required Linux capabilities.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-01-02 17:56:12 +01:00
DL6ER a3410a78f6 Add dnsmasq_interface.h as dependency of the dnsmasq objects. This forces a rebuild whenever interface definitions are changed.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-01-01 14:27:08 +01:00
DL6ER 36d1499804 Add network table. This will update the database to version 3. Furthermore, we make some database routines globally (add prototypes to routines.h) and mark some internal database variables as static. This commit also improves on the speed of the database routines as the main loop is changed to run from the last saved query to the most recent one instead of looping over all queries in memory. This ID is corrected when queries are removed in gc.c
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-12-23 12:51:03 +01:00
Mcat12 ff4d985f9d Merge branch 'new/shmem' into feature/shm-lock
# Conflicts:
#	database.c
#	request.c
2018-11-21 14:56:15 -05:00
DL6ER 85290bb73e Merge branch 'development' into new/shmem
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-11-21 20:44:37 +01:00
DL6ER b7b038b1a3 Upgrade internal dnsmasq from v2.79 to v2.80
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-10-22 21:35:16 +02:00
Mcat12 3283d687e1 Remove threads.o from Makefile
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-10-05 01:22:02 -04:00
DL6ER 2e12558f04 Allocate shared memory in units of pages
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-08-02 17:40:26 +02:00
DL6ER 1b7e08419c Add shared memory components to store strings in shared memory
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-08-02 13:23:12 +02:00
DL6ER 79e63dd63e Merge branch 'development' into new/regex-lists 2018-05-27 10:37:15 +02:00
Mark Drobnak a662c6dadd Change -Wl,-pie to -pie
Signed-off-by: Mark Drobnak <newtoncat12@yahoo.com>
2018-05-26 17:38:12 -04:00
DL6ER d52482168a Switch to compiling on GNU-C11 standard. According to https://gcc.gnu.org/onlinedocs/gcc-4.9.1/gcc/C-Dialect-Options.html#C-Dialect-Options this dialect will become standard in a future gcc.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-05-26 23:12:12 +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 410075cd34 Add setcap to make install target (we don't do it in the init.d/systemd script anymore, so we have to do it after the binary is copied to its final location)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-04-17 10:53:30 +02:00
DL6ER e2d0529993 Implement name resolving power back for FTLDNS. This re-implements lots of already extensively tested code that was present in pre-FTLDNS for over a year. This implementation is only slightly different by ensuring that name resolution is done in a specific non-blocking way.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-04-11 18:20:06 +02:00
DL6ER 392a23d5e7 Remove disbaled sanitizer options
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-03-21 20:42:34 +01:00
DL6ER 9ea9a53859 Use -fstack-protector-strong only if compiler is not arm-linux-gnueabihf-gcc
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-03-21 20:38:15 +01:00
DL6ER 734b2559d5 Update CFLAGS with recommended gcc flags (hardening, performance, etc.)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-03-21 20:28:23 +01:00
DL6ER 5de6e5dec1 Prefer locally compiled libhogweed (if available)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-03-21 20:16:42 +01:00
DL6ER dcc89f6423 Change dnsmasq version to 2.78. Use locally compiled libnettle if available to be able to compile on Raspbian
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-03-18 20:28:20 +01:00
DL6ER 25e95c35e9 Apply dnsmasq patch v2.78 -> v2.79
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-03-18 19:47:22 +01:00
DL6ER cd5ccc44ed Re-enable "make install" target
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-03-13 21:42:00 +01:00
DL6ER e20af6b90e Actually compile the DNSSEC libraries statically
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-03-06 15:48:01 +01:00
DL6ER 2ae4b52bb3 A number of improvements:
- use "extern" for the glibal variable specifications in the header files (and clarif where the variables are actually defined)
- record number of failed requests to forward destinations
- Add dnsmasq_interface.h to DTLDEPS
- Add new request type ">cacheinfo" to get information about cache usage in the resolver

Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-02-26 17:24:09 +01:00
DL6ER 41afe2aa56 Fix Makefile
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-02-23 17:02:34 +01:00
DL6ER b74a0290ac Update CI instructions, try to build only x86_64 at this time
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-02-22 20:29:43 +01:00
DL6ER ea3309e7b1 Initial commit for FTLDNS
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-02-22 20:21:06 +01:00
DL6ER ecde321632 Add custom macros for the memory-functions
- calloc,
- realloc,
- free, and
- strdup

These functions will not directly improve memory handling but they will log if something will go wrong *before* it actually goes wrong. This will ease debugging when user provide log snippets especially in ENOMEM (no memory available) situations.

Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-02-07 12:24:12 +01:00
Mcat12 700a21b0e1 Update the Makefile with new API file structure
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-01-12 14:57:08 -05:00
Mcat12 e527985371 Implement getStats using MessagePack
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-01-04 12:04:04 -05: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 900a3fa5cb Add "socket-test" target in Makefile
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-01-01 00:59:10 +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 86d370e46a Return special version if compiled on a branch != master
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-11-03 18:31:04 +01:00
Mcat12 9ec7bd8722 Implement simple JSON parsing for addList
Uses cJSON to parse, but output will still be handled directly.
I implemented different API response methods to allow for different HTTP
response codes to be sent.
The addList code is still dumb and doesn't do anything, but it's getting
there.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2017-08-09 21:28:38 -04:00
Mcat12 4762b8a55c Reorganize to split up API functions
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2017-08-06 19:06:12 -04: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 94c7f39d6c Merge branch 'development' into new/db
Conflicts:
	Makefile
2017-06-12 12:07:04 +02:00
Mcat12 a7ca42ab12 Remove need for empty obj directory in repo 2017-06-11 19:21:25 -04:00
DL6ER 838585e254 Add optimization flags for SQLite3's building process 2017-06-09 14:11:50 +02:00
DL6ER d6dde2d09b Don't recompile the sqlite object file when switching branches 2017-06-09 12:02:10 +02:00
DL6ER a51501e56c Compile SQLite3 w/o debugging options 2017-06-09 10:53:07 +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