Mark Drobnak
6c5ebf8657
Merge pull request #227 from pi-hole/fix/strdup
...
Define our own strdup()
2018-02-12 16:18:51 -05:00
DL6ER
971a162866
Don't rely on the system's strdup() function but provide our own
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-02-12 12:46:33 +01:00
DL6ER
d918d8bff2
Merge pull request #226 from pi-hole/fix/flush-overTime-null
...
Fix accidentally trying to free NULL
2018-02-12 09:54:23 +01:00
Mcat12
abdff6e5b2
Fix accidentally trying to free NULL
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-02-11 22:03:11 -05:00
DL6ER
672b6acca2
Merge pull request #225 from pi-hole/fix/showblocked
...
Bugfix for API_QUERY_LOG_SHOW option
2018-02-09 23:28:06 +01:00
DL6ER
f11b6c892d
Don't show queries with status 5 (blocked by black.list) when API_QUERY_LOG_SHOW=permittedonly or API_QUERY_LOG_SHOW=nothing is set
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-02-08 20:00:17 +01:00
DL6ER
d48f3bb178
Update tests to expect the new table "counters" and version 2 of the database. Also check if the time stamp index was created.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-02-08 19:15:53 +01:00
DL6ER
d7a14e7e81
- Create new table "counters" and store integrated counters therein.
...
- Update FTL database to version 2
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-02-08 19:04:56 +01:00
DL6ER
454d96829f
Merge pull request #223 from pi-hole/fix/memory_checks
...
Improve memory checks
2018-02-07 22:35:03 +01:00
DL6ER
e75bd26994
Improve overall memory handling by checking for failed memory allocation events at the places we need the allocated space
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-02-07 13:23:54 +01:00
DL6ER
10962a07a6
Improve memory handling in api.c
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-02-07 12:29:21 +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
Mark Drobnak
846bead047
Merge pull request #222 from pi-hole/fix/databaseclient_IPs
...
Always store client IP in the database (never the host name)
2018-02-05 16:23:52 -05:00
DL6ER
4e056dfd7e
Always store client IP in the database (never the host name). We do this for consistency as we will always have IP addresses but not always host names so the current situation can actually be messy in the database. Furthermore, it should be noted that we also only ever store IP addresses (and never host names!) for the forward destinations.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-02-05 17:06:37 +01:00
Mark Drobnak
107f9dec74
Merge pull request #221 from pi-hole/fix/msgpack/unsigned_int
...
Fix signedness of integer constant
2018-02-03 11:20:58 -05:00
DL6ER
333163529f
Fix signedness of integer constant. This was a problem on 32bit platforms.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-02-03 12:20:38 +01:00
DL6ER
9ace93559d
Merge pull request #218 from pi-hole/tweak/some_optimizations
...
Minor optimizations and one bug fix
2018-02-01 22:42:39 +01:00
DL6ER
449a2fc44d
Minor optimizations and one bug fix
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-26 17:21:29 +01:00
Mark Drobnak
1e2a02ac50
Merge pull request #217 from pi-hole/fix/findClientID_hostnames
...
Fix missing information bug in findClientID()
2018-01-24 10:43:42 -05:00
Mark Drobnak
bef10ed9dd
Fix spelling
...
Signed-off-by: Mark Drobnak <newtoncat12@yahoo.com >
2018-01-24 09:42:27 -05:00
DL6ER
c4f491d5ae
Fix missing information bug in findCLientID()
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-24 00:45:14 +01:00
Mark Drobnak
2f473b80ea
Merge pull request #215 from pi-hole/update/sqlite3.22.0
...
Update SQLite3 from 3.21.0 to 3.22.0
2018-01-22 16:50:52 -05:00
DL6ER
066925737a
Update SQLite3 from 3.21.0 to 3.22.0
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-22 22:02:29 +01:00
DL6ER
77827b4c34
Merge pull request #212 from pi-hole/new/MAXLOGAGE
...
Add "MAXLOGAGE" config option
2018-01-22 20:51:04 +01:00
Mark Drobnak
3b22cccfc3
Merge pull request #214 from pi-hole/fix/negative_unknown
...
Mark queries we mark as not completed again as unknown
2018-01-22 14:47:17 -05:00
DL6ER
1d1ac54086
Mark queries we mark not completes again as unknown so they are counted correctly later in the code.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-22 18:18:49 +01:00
DL6ER
2624012ca0
Add to README that maximum is 31 days
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-22 10:16:15 +01:00
DL6ER
99d27c4779
Merge branch 'development' into new/MAXLOGAGE
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
Conflicts:
parser.c
2018-01-22 10:14:54 +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
Mark Drobnak
fc0ef14363
Merge pull request #75 from pi-hole/new/API
...
Use MessagePack for the Unix socket API
2018-01-21 17:45:36 -05:00
Mcat12
5341b18ecf
Handle possible pack_fixstr or pack_str32 error
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-01-21 15:40:58 -05:00
Mcat12
9bc056248f
Use a static buffer for getallqueries string arguments
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-01-21 15:02:41 -05:00
DL6ER
7955b770c4
Merge pull request #213 from pi-hole/tweak/ANY
...
Skip ANY entries, log that we have seen them if in debug mode
2018-01-21 20:00:46 +01:00
Mcat12
b6b7b5708b
Only allow up to 2GB strings to be sent
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-01-21 12:46:46 -05:00
Mcat12
42bf9a4c6f
Fix status output in getStats
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-01-21 11:37:37 -05:00
DL6ER
09334d11b9
Skip ANY entries, log that we have seen them if in debug mode
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-21 17:08:45 +01:00
Mcat12
9007af7dbb
Fix under-allocation in getVersion
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-01-21 10:54:59 -05:00
Mcat12
be5815fbda
Use float instead of double in getQueryTypesOverTime
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-01-21 10:54:21 -05:00
Mcat12
4e8027b74d
Use float instead of double in getForwardDestinationsOverTime
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-01-21 10:53:29 -05:00
Mcat12
ad99f975fe
Fix under-allocation in getTopDomains
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-01-21 10:43:03 -05:00
Mcat12
76aff45eb5
Clarify getOverTime comment
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-01-21 10:41:23 -05:00
Mcat12
173efff918
Don't use buffers in getStats
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-01-21 10:38:34 -05: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
bfd3f1405d
Add "MAXLOGAGE" config option
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-21 15:13:50 +01:00
DL6ER
6da7c01f42
Remove "TIMEFRAME" option
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-21 14:57:04 +01:00
DL6ER
1ca920310e
Don't read pihole.log.1 to enhance startup speed of FTL
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-21 14:41:22 +01:00
DL6ER
a06d929bf0
Merge pull request #210 from pi-hole/fix/check_sockets
...
Only listen on IPv4 and IPv6 telnet sockets if we successfully bound to the corresponding port
2018-01-21 14:18:30 +01:00
DL6ER
8a7d1c4303
Merge pull request #209 from pi-hole/fix/database-forwardID
...
Validate database entries on import
2018-01-21 14:09:22 +01:00
DL6ER
fdf7b5aca6
Merge branch 'fix/database-forwardID' into fix/check_sockets
2018-01-21 14:09:02 +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