DL6ER
|
d25f05d339
|
Respect settings RESOLVE_IPV4 and RESOLVE_IPv6 also when trying to resolve host names from the database (network table)
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-11-30 19:27:08 +01:00 |
|
DL6ER
|
99a07ba57a
|
Rename super-clients ---> alias-clients
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-11-15 19:09:48 +01:00 |
|
DL6ER
|
6f6ae518d2
|
Merge branch 'development' into new/super-clients
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-11-15 08:47:44 +01:00 |
|
DL6ER
|
5341aefcae
|
Move call to resolveNetworkTableNames() from resolver into database thread
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-10-19 08:32:10 +02:00 |
|
DL6ER
|
b7fe809467
|
Reopening the FTL database may lead to rare race-collisions in SQLite3. We avoid them by keeping the database connection open all the time.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-09-27 23:35:44 +02:00 |
|
DL6ER
|
489b6f08f5
|
Merge branch 'development' into new/super-clients
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-09-27 22:04:59 +02:00 |
|
DL6ER
|
a3debeb358
|
Merge pull request #874 from pi-hole/tweak/always_update_database_hostnames
Always update database hostnames
|
2020-09-27 09:11:00 +02:00 |
|
DL6ER
|
328ede1c95
|
Merge pull request #871 from pi-hole/new/clean_network_addresses
Clean network addresses
|
2020-09-22 12:29:10 +02:00 |
|
DL6ER
|
196fca38ff
|
Merge branch 'development' into new/super-clients
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-09-21 23:28:57 +02:00 |
|
DL6ER
|
d97ca3187d
|
Handling of clients not in ARP has been moved into add_FTL_clients_to_network_table()
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-09-21 23:06:25 +02:00 |
|
DL6ER
|
cadb13d35c
|
Add real-time signal 4 to re-resolve all host names (clients + upstream servers)
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-09-21 23:00:01 +02:00 |
|
DL6ER
|
a677fd4218
|
Do not skip recently inactive clients in ARP/neighbor table processing as they may still need properties to be updated (like host names, etc.)
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-09-21 22:57:38 +02:00 |
|
DL6ER
|
e1285430ca
|
Add more debug logging to getDatabaseHostname()
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-09-21 22:57:38 +02:00 |
|
DL6ER
|
4883037816
|
Merge pull request #881 from pi-hole/tweak/event_queue
Add event queue for signal handling
|
2020-09-21 22:57:08 +02:00 |
|
DL6ER
|
3bb0fe98be
|
Fix subdirectory include paths. This is only to be explicit, the relative search finds them otherwise as well
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-09-03 20:46:01 +02:00 |
|
DL6ER
|
9bdfee2e19
|
Remove duplicate function getDatabaseHostname()
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-08-31 20:35:46 +02:00 |
|
DL6ER
|
693aa46319
|
Fix syntax error
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-08-31 19:50:47 +02:00 |
|
DL6ER
|
5f5ecb96a1
|
Use already existing (but by default disabled) cleaning. The interval is customizable and defaults to MAXDBDAYS.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-08-31 19:39:16 +02:00 |
|
DL6ER
|
2d90c17767
|
Merge branch 'development' into new/super-clients
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-08-31 19:05:59 +02:00 |
|
DL6ER
|
a598022a9f
|
Try to obtain host names from another address of the same device when there is none for the exact address (may happen, e.g., for IPv6 addresses)
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-08-31 18:58:29 +02:00 |
|
DL6ER
|
6d84dd90b2
|
Delete addresses from network_addresses table which have not be seen for 7 days
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-08-24 20:16:48 +02:00 |
|
DL6ER
|
e3f9f98939
|
Parse the kernel's Internet protocol address management to get information about local interfaces.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-08-19 23:54:51 +02:00 |
|
DL6ER
|
d323536099
|
Unify network table debug messages
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-08-18 23:56:43 +02:00 |
|
DL6ER
|
2d1ec8099f
|
Do not re-open gravity database when not forking for TCP workers (debug mode) and simplify network table routines (remove code duplication and prevent possible dead-locks when trying to resolve host names)
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-08-18 23:28:57 +02:00 |
|
DL6ER
|
1dde00299b
|
Ensure mock-devices which are not assigned to any addresses any more (they have been converted to "real" devices), are removed at this point
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-08-18 23:00:40 +02:00 |
|
DL6ER
|
15e3d66dad
|
Add more debugging output to network table processing
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-08-17 21:47:56 +02:00 |
|
DL6ER
|
c81b5df4ef
|
Do not try to locate a previously used mock device when EDNS(0) MAC data is available.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-08-17 20:05:08 +02:00 |
|
DL6ER
|
1a6e0837f7
|
Use EDNS(0) MAC address for the network table (if available)
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-08-16 23:11:52 +02:00 |
|
DL6ER
|
69c1181085
|
Change concept of super-clients from MAC-based to index-based. We append a new column to the network table which can be used to assign super-clients to multiple devices. This can both cover automatic grouping (whenever MAC addresses are available) and also situations where this is not possible (when MAC addresses are not available, e.g., due to network layer separation). Real-time signal 3 causes FTL to re-import super-clients from the database without affecting anything else.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-08-12 19:34:56 +02:00 |
|
DL6ER
|
b422beb82a
|
Implement client-based Query Log filtering for super-clients and ensure we always count both the normal and the super-client when there is a new query / garbage collection
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-08-11 21:13:36 +02:00 |
|
DL6ER
|
05b08477b6
|
Ensure we're not always binding NULL to macVendor
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-06-24 20:23:35 +02:00 |
|
DL6ER
|
42d0658587
|
Add MAC vendor debug output
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-06-24 20:11:33 +02:00 |
|
DL6ER
|
adee5d53ff
|
Check if we need to open the database and only close the connection when we also opened in the respective function.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-06-23 22:37:25 +02:00 |
|
DL6ER
|
f18f758808
|
Merge branch 'development' into new/mac_clients
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-06-05 14:23:36 +02:00 |
|
DL6ER
|
a0e0c4b31d
|
Also check REVOLCE_IPV{4,6} setting when trying to derive a host name from the FTL database.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 07:11:53 +02:00 |
|
DL6ER
|
361ab9a60e
|
Minor style change
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-25 18:34:18 +02:00 |
|
DL6ER
|
2c74d05ecb
|
The IP address in now a UNIQUE field in the network_addresses table. Hence, new assignments of a previously seen IP address will automatically move them to the new device. This makes removing old entries somewhat less important. We disable the automated removal for now, but leave the option MAXNETAGE so users can re-enable this if they feel a need for it.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-22 10:43:47 +02:00 |
|
DL6ER
|
932f42f9d2
|
Add per-interface client selection.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-20 17:44:49 +02:00 |
|
DL6ER
|
cd798a5b07
|
Factor out conversion of mock-device into a real device into its own subroutine.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-20 15:01:00 +02:00 |
|
DL6ER
|
c8d6b43fbe
|
Factor out new device creation into its own subroutine.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-20 14:49:06 +02:00 |
|
DL6ER
|
24a3fa0158
|
Obtain and store interface also for clients not known through the neigh cache (e.g., VPN connected). This works currently only for clients requesting queries over UDP and when bind-interfaces is NOT used.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-20 14:29:42 +02:00 |
|
DL6ER
|
8466bb408e
|
Try to resolve host names of new devices added to the network table and actually commit host names updates done hourly.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-19 11:13:22 +02:00 |
|
DL6ER
|
e1c56f754d
|
Add support for specifying clients by their host names.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-18 10:54:57 +02:00 |
|
DL6ER
|
1438a24a0c
|
Add name and nameUpdated fields to network_addresses table and drop separated network_names table (if exists). The latter is superseded by the extension of the former.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-18 10:08:55 +02:00 |
|
DL6ER
|
eb67323ad6
|
Fix update_netDB_hostname() to rely on the primary key to select the row to be replaced on duplicates.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-15 18:40:42 +02:00 |
|
DL6ER
|
a3de0a934b
|
Use stack instead of heap memory as it is cheaper.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-15 00:56:09 +02:00 |
|
DL6ER
|
aecd6b24fc
|
Only show hardware address in debug log if this is a meaningful information.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-14 19:04:20 +02:00 |
|
DL6ER
|
edf15d86e3
|
Add MAXNETAGE config option to allow user-defined (instead of hard-coded) maximum age of IP addresses and host names in the network table.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-14 18:44:10 +02:00 |
|
DL6ER
|
51d801d805
|
Also remove too old host names from the database.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-14 18:44:10 +02:00 |
|
DL6ER
|
9207608879
|
Create new network_names table. This adds support for multiple hostnames per client (hardware address). Updates pihole-FTL.db version to 7.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-14 18:44:10 +02:00 |
|