Skip to content

Commit

Permalink
Merge pull request #144 from pi-hole/development
Browse files Browse the repository at this point in the history
FTL v2.11.1
  • Loading branch information
dschaper authored Oct 8, 2017
2 parents d4c8408 + e824b86 commit 48068d3
Show file tree
Hide file tree
Showing 5 changed files with 4,901 additions and 3,177 deletions.
11 changes: 11 additions & 0 deletions parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,17 @@ void process_pihole_log(int file)
}
}

// Detect time travel events
if(timeidx < 0)
{
// This query is older than the first one in the log, hence the clock
// on this machine was at least slightly off for a while. We will skip
// this query as we cannot attribute it correctly to anything.
validate_access("overTime", 0, false, __LINE__, __FUNCTION__, __FILE__);
logg("Warning: Skipping log entry with incorrect timestamp (%i/%i)", overTimetimestamp, overTime[0].timestamp);
continue;
}

// Get domain
// domainstart = pointer to | in "query[AAAA] |host.name from ww.xx.yy.zz\n"
const char *domainstart = strstr(readbuffer, "] ");
Expand Down
2 changes: 2 additions & 0 deletions request.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ void process_request(char *client_message, int *sock)
else if(command(client_message, ">kill"))
{
processed = true;
sprintf(server_message,"killed\n");
swrite(server_message, *sock);
logg("FTL killed by client ID: %i",*sock);
killed = 1;
}
Expand Down
Loading

0 comments on commit 48068d3

Please sign in to comment.