New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add IPv6 support for network table #591
Conversation
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Can we be sure that the |
…erence to the network(id) field using a foreign key contraint. SQLite foreign key constraints are used to enforce "exists" relationships between the two tables. Attempting to insert a row into the network_addresses table that does not correspond to any row in the network table will fail, as will attempting to delete a row from the network table when there exist dependent rows in the network_addresses table. Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
…t make queries to FTL at the moment. Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
…to new/networktable_ip_neigh
…last seen in the ARP/NDP cache) Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
…S must be set to ON for each database connection. Signed-off-by: DL6ER <dl6er@dl6er.de>
…ce uniqueness on a pair of columns. Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
…his index when adding the entry to the network_addresses table. Signed-off-by: DL6ER <dl6er@dl6er.de>
Now that we are storing IPs in the |
Removing a column is only possible by creating a new table, copying all but the I also agree that we can create an entry in |
Signed-off-by: DL6ER <dl6er@dl6er.de>
…an value on error. Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
…nnections through a compile time flag. Signed-off-by: DL6ER <dl6er@dl6er.de>
…ation Signed-off-by: DL6ER <dl6er@dl6er.de>
08717e7
to
adbdf3f
Compare
Signed-off-by: DL6ER <dl6er@dl6er.de>
I got this error when it tried to upgrade the database:
|
It looks like since we enable foreign keys by default, we need to disable them as part of step one:
|
…es necessary as we enabled foreign key enforcement by default for all database connections. Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved pending merge conflict resolution.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/apple-devices-not-in-network-overview/22177/6 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: |
By submitting this pull request, I confirm the following (please check boxes, eg [X]) Failure to fill the template will close your PR:
Please submit all pull requests against the
development
branch. Failure to do so will delay or deny your requestHow familiar are you with the codebase?:
10
Add IPv6 support for the network table. This updates the database version to 5.
As we expect an interface to have a number of addresses in the IPv6 world, we introduce a new database table
network_addresses
with three columns:id
corresponds to theid
of thenetwork
table and, as such, to a unique hardware address.ip
contains a given IP address corresponding to the hardware address identified by this particularid
lastQuery
: Unix timestamp of last query seen from this particular IP address.Conflict management has been implemented to only update the
lastQuery
column if a given(id,ip)
pair already exists in the database. This avoids multiple entries from the same data.This is a backend implementation. This frontend needs to be modified as well in order to be able to source the new data. This is not a breaking change as the new version can be used with the current dashboard without any issues.
This template was created based on the work of
udemy-dl
.