mirror of
https://github.com/pi-hole/FTL.git
synced 2024-10-26 16:52:18 +02:00
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>
This commit is contained in:
+1
-4
@@ -354,10 +354,7 @@ void save_to_DB(void)
|
||||
sqlite3_bind_text(stmt, 4, domains[queries[i].domainID].domain, -1, SQLITE_TRANSIENT);
|
||||
|
||||
// CLIENT
|
||||
if(strlen(clients[queries[i].clientID].name) > 0)
|
||||
sqlite3_bind_text(stmt, 5, clients[queries[i].clientID].name, -1, SQLITE_TRANSIENT);
|
||||
else
|
||||
sqlite3_bind_text(stmt, 5, clients[queries[i].clientID].ip, -1, SQLITE_TRANSIENT);
|
||||
sqlite3_bind_text(stmt, 5, clients[queries[i].clientID].ip, -1, SQLITE_TRANSIENT);
|
||||
|
||||
// FORWARD
|
||||
if(queries[i].status == 2 && queries[i].forwardID > -1)
|
||||
|
||||
Reference in New Issue
Block a user