Siddharth Kannan 06b0606199 Fix initOverTime's calculation of last slot timestamp
initOverTime calculate's the last slot timestamp with the assumption that `OVERTIME_INTERVAL` will
allow atleast `OVERTIME_SLOTS` number of slots between now and the last slot in the current
hour. This leads it to calculate the timestamp of the last slot, and then assign timestamps to each
slot counting down from that timestamp.

This logic is not compatible with changes in the OVERTIME_INTERVAL and the MAXLOGAGE variables. Here
is a demonstration of a case where this can be shown clearly:

```
OVERTIME_INTERVAL = 60s (Each slot stores 1 minute of data)
MAXLOGAGE = 600s (Store date for only 10 minutes)
OVERTIME_SLOTS = 11 (MAXLOGAGE/OVERTIME_INTERVAL)
```

- Current time: 10:35
- Last slot time: 10:59:30
- First slot time: 10:48:30

Note that this logic *does* work as expected with the default minimum of 1 hour for the MAXLOGAGE
configuration variable.

Signed-off-by: Siddharth Kannan <mail@siddharthkannan.in>
2022-04-02 13:14:33 +09:00
2022-02-12 13:21:05 +01:00
2019-06-08 18:35:10 +02:00
2022-02-08 20:29:23 +01:00
2017-06-03 15:05:41 +02:00
2021-02-18 19:53:48 -08:00

Pi-hole
Network-wide ad blocking via your own Linux hardware

FTLDNS

FTLDNS (pihole-FTL) provides an interactive API and also generates statistics for Pi-hole®'s Web interface.

  • Fast: stats are read directly from memory by coupling our codebase closely with dnsmasq
  • Versatile: upstream changes to dnsmasq can quickly be merged in without much conflict
  • Lightweight: runs smoothly with minimal hardware and software requirements such as Raspberry Pi Zero
  • Interactive: our API can be used to interface with your projects
  • Insightful: stats normally reserved inside of dnsmasq are made available so you can see what's really happening on your network

Official documentation

The official FTLDNS documentation can be found here.

Installation

FTLDNS (pihole-FTL) is installed by default when you choose to enable the Web interface when installing Pi-hole.

IMPORTANT!

FTLDNS will disable any existing installations of dnsmasq. This is because FTLDNS is dnsmasq + Pi-hole's code, so both cannot run simultaneously.

S
Description
The Pi-hole FTL engine
Readme 33 MiB
Languages
C 99.1%
Shell 0.6%
CMake 0.2%