DL6ER
a595f2124a
Merge branch 'development' into new/shmem
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-12-09 19:44:54 +01:00
DL6ER
23b0746168
Simplify upstream percentage computation.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-11-24 09:03:06 +01: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
ebbb3e4077
Reimplement skipping of "0.0.0.0" in Top Client output
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-11-10 20:53:27 +01:00
DL6ER
8de30790f8
Review comments
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-11-10 08:16:36 +01:00
DL6ER
eeae592c58
Ensure regex validation is working as expected if privacylevel > 0. This required a certain rearrangement of how we handle domains and clients internally.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-11-09 19:02:06 +01:00
DL6ER
ea7cdfb0ba
Merge branch 'development' into new/shmem
2018-09-26 23:14:09 +02:00
DL6ER
af067b0682
Always return data for blocklist and cache in ">forward-dest"
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-09-25 15:58:24 +02:00
Mcat12
cd41aaeab4
Put overTime data into shared memory
...
The array of overTime structs is separate from the client data, because
the client data is dynamically sized. Each client has a separate shared
memory block named `/FTL-client-ID` where `ID` is the numerical ID of
the client. The client data is an array of ints, which is indexed using
the overTime time indexes.
Before, the code referenced the client data via
`overTime[timeIndex].clientdata[clientID]`
Now, the code references the data via
`overTimeClientData[clientID][timeIndex]`
The client data is updated whenever a new client or overTime slot is
added, so referencing the client data should always be valid.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-09-19 13:00:50 -04:00
Mcat12
ae1bb5b71a
Move counters to shared memory
...
This requires that it be accessed through a pointer, so most of the
changes are just changing `counters.` to `counters->`
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-09-03 14:25:16 -04:00
Mcat12
992726d929
Fix compile error due to merge
...
The merged in code tried to use normal strings instead of shared memory
strings.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-09-01 22:41:49 -04:00
Mcat12
bbfe186dd8
Merge branch 'development' into new/shmem
...
# Conflicts:
# api.c
# dnsmasq_interface.c
2018-09-01 22:34:39 -04:00
DL6ER
6aa7ac5917
Fix indentation
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-08-21 12:12:14 +02:00
DL6ER
1dca54c28b
Ensure validate_access() calls are also valid if no counters.{domains,forwarded,clients} are zero
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-08-20 18:43:12 +02:00
DL6ER
697f140786
Add validate_access() guards
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-08-20 18:35:07 +02:00
DL6ER
a725f03fae
Optimize ">getallqueries-clients"
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-08-20 18:33:27 +02:00
DL6ER
e20cee447c
Optimize ">getallqueries-domain"
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-08-20 18:30:37 +02:00
DL6ER
c5490410c4
Fix typo in comment
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-08-16 18:19:44 +02:00
DL6ER
c0bda36e16
Don't return any data if user requested an invalid query type in getallqueries
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-08-16 18:19:00 +02:00
DL6ER
2b27f8a928
Implement forward destination filtering
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-08-15 17:51:38 +02:00
DL6ER
a5a491b4f9
Add query type forting for ">getallqueries" request
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-08-15 15:26:59 +02:00
DL6ER
a3ac3bc569
Be able to return any query type through API
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-08-09 11:58:08 +02:00
DL6ER
96928c73ef
Use strbuffer also for domains
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-08-01 19:04:02 +02:00
DL6ER
b7da12b600
Use strbuffer also for client IPs and host names
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-08-01 18:37:48 +02:00
DL6ER
3e8849049e
Store forward destination IP address and host name in contiguous string buffer
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-08-01 18:04:43 +02:00
DL6ER
dc87186ea2
Client names of new clients may be invalid strings. Test against NULL before passing to strcmp(). Fixes #328
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-07-25 13:53:10 -04:00
DL6ER
25eb416f92
Remove memory sub-structure
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-06-23 15:02:36 +02:00
Rob Gill
89da80cbba
Fix typo in >memory telnet response
...
The word «allocated» was repeated in the telnet response to >memory.
Signed-off-by: Rob Gill <rrobgill@protonmail.com >
2018-06-23 21:55:40 +10:00
Mcat12
47445d8e08
Update socket API for forward destinations
...
It now sends the name of the destination instead of an empty string.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-06-16 15:35:46 -04:00
Mcat12
0d6a37e4bf
Send all query type names and values through socket API
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-06-15 22:29:20 -04:00
DL6ER
400b37c4a0
Merge pull request #309 from pi-hole/new/stats_reply_data
...
Include counters for individual reply types in ">stats"
2018-06-15 08:28:02 +02:00
Mcat12
e72c017706
Always send the total number of domains/clients, but pretend it's zero
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-06-14 14:50:22 -04:00
Mark Drobnak
9db644ec8b
Merge pull request #307 from pi-hole/tweak/mintime
...
Ensure that we do never send data that is older than maxlogtime
2018-06-14 09:35:30 -04:00
DL6ER
2c151599da
Include counters for individual reply types in ">stats"
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-06-13 20:27:35 +02:00
Mcat12
4d5da59071
Always send the commit hash
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-06-11 21:25:02 -04:00
DL6ER
738415ee59
Ensure that we do never send data that is older than maxlogtime
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-06-07 17:35:15 +02:00
Mcat12
d06decad80
Send client name and IP through telnet as well
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-06-06 18:00:55 -04:00
Mcat12
2ed2115f54
Only send client names (and IP for socket connection) in getClientNames
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-06-03 16:03:25 -04:00
Mark Drobnak
94d25c5883
Merge branch 'development' into new/regex-lists
2018-05-25 18:18:09 -04:00
DL6ER
218e599dd1
Add dns_queries_all_types field to ">stats". While dns_queries is the number of entires in the query log (only A and AAAA queries), the new counter also takes PTR, SOA, etc. into account.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-05-25 09:22:07 +02:00
DL6ER
9b5eb62263
Don't set regex status for domains read from database as we don't add them to the resolvers cache here (performance reasons)
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-05-19 17:40:34 +02:00
DL6ER
db7dbda9da
Use status == QUERY_WILDCARD to identify regex blocked queries
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-05-19 16:37:25 +02:00
DL6ER
decef2e5fd
Remove special support for old type of wildcard lists as dnsmasq config file
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-05-19 14:46:21 +02:00
DL6ER
24b98093e8
Merge branch 'development' into ftldns/remove_old_debug_options
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
Conflicts:
args.c
2018-05-12 13:38:36 +02:00
DL6ER
c606ad75ab
Remove undocumented, old, and unused debug commands
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-05-10 19:24:02 +02:00
DL6ER
db2e0d9361
Implement API changed to add new option (e.g. ">top-clients blocked withzero (20)")
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-05-10 14:37:39 +02:00
DL6ER
3fd61b6367
Use "blocklist" instead of "blocked" in the forward destions graphic
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-04-29 17:14:13 +02:00
DL6ER
eec4a2c553
Add "blocked" as another "forward destination". So far, "local" was the sum of queries answered from cache and blocked domains
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-04-28 23:07:55 +02:00
DL6ER
cf6ccdf5e0
There is no reason to allocate space for a constant string. Remove this.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-04-14 11:45:17 +02:00
DL6ER
9f5ae9495d
Return only names if we actually have them
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-04-12 17:18:52 +02:00