DL6ER
July 16, 2024, 9:00am
3
Yes, this currently affects all ARM builds as the configuration of fail01.dnssec.works
changed causing some of our CI containers to fail to build the most recent binaries. So yes, the display is right: There is an update available but you cannot download it as the ARM binaries are not ready.
This will be fixed within
pi-hole:development-v6
← pi-hole:tweak/api_network_info
opened 02:43PM - 14 Jul 24 UTC
# What does this implement/fix?
The existing implementation for `/api/network… /{gateway,interface}` relied on manually parsing various files in `/proc/` and `/sys/class/net`. This had several drawbacks, e.g., was it not possible to get IPv6 routes (and, hence, gateways) or lifetimes and priority of IPv6 addresses.
This PR instead implements [Netlink](https://en.wikipedia.org/wiki/Netlink) which is the proper way of querying the kernel in a standardized way about routes and interface details. It is also the same method used by the popular `ip` command (e.g. `ip a` and `ip r`):
> Netlink is designed and used for transferring miscellaneous networking information between the [kernel space](https://en.wikipedia.org/wiki/Kernel_space) and userspace processes. Networking utilities, such as the [iproute2](https://en.wikipedia.org/wiki/Iproute2) family and the utilities used for configuring [mac80211](https://en.wikipedia.org/wiki/Mac80211)-based wireless drivers, use Netlink to communicate with the [Linux kernel](https://en.wikipedia.org/wiki/Linux_kernel) from userspace. Netlink provides a standard [socket](https://en.wikipedia.org/wiki/Internet_socket)-based interface for userspace processes, and a kernel-side [API](https://en.wikipedia.org/wiki/Application_programming_interface) for internal use by [kernel modules](https://en.wikipedia.org/wiki/Kernel_module). Originally, Netlink used the `AF_NETLINK` socket family.
>
> Netlink is designed to be a more flexible successor to [ioctl](https://en.wikipedia.org/wiki/Ioctl); [RFC 3549](https://tools.ietf.org/html/rfc3549) describes the protocol in detail.
This change allows us to provide much better/more complete interface information through the API offering the base for implementing [this Discourse feature request](https://discourse.pi-hole.net/t/list-ip-v4-and-v6-address-in-web-interface/70981/).
Note: The `prefered` (one `r`) typo is a standard typo in Linux and expected.
---
**Related issue or feature (if applicable):** N/A
**Pull request in [docs](https://github.com/pi-hole/docs) with documentation (if applicable):** N/A
---
**By submitting this pull request, I confirm the following:**
1. I have read and understood the [contributors guide](https://docs.pi-hole.net/guides/github/contributing/), as well as this entire template. I understand which branch to base my commits and Pull Requests against.
2. I have commented my proposed changes within the code.
3. I am willing to help maintain this change if there are issues with it later.
4. It is compatible with the [EUPL 1.2 license](https://opensource.org/licenses/EUPL-1.1)
5. I have squashed any insignificant commits. ([`git rebase`](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
## Checklist:
- [x] The code change is tested and works locally.
- [x] I based my code and PRs against the repositories `developmental` branch.
- [x] I [signed off](https://docs.pi-hole.net/guides/github/how-to-signoff/) all commits. Pi-hole enforces the [DCO](https://docs.pi-hole.net/guides/github/dco/) for all contributions
- [x] I [signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) all my commits. Pi-hole requires signatures to verify authorship
- [x] I have read the above and my PR is ready for review.
2 Likes