NDP Table page is really slow
-
The NDP table from diagnostics menu is really slow when there is lots of local link entries.
The ndp_diag.php script get the list of addresses via the "ndp -na" command, then tries to obtain the corresponding host name by querying the DNS for each entry.
For local link entries, the ipv6 address returned by ndp is in the form of "fe80::aaaa:bbbb:cccc:dddd%ifname".
This result is passed as is to DNS, which cannot resolve it, but wastes time.A simple solution is to not try dns resolution for these addresses.
For testing, i'd replace :if ($dnsavailable) {
by
if ($dnsavailable && ! str_starts_with($entry['ipv6'], "fe80::")) {
On my system, with around fifty links, the page load time went from 20s to 680ms.
Could you fix this problem please?
-
@syn4ck https://redmine.pfsense.org/