Bug #13318


NDP Table not showing hostname

Added by JohnPoz _ about 2 months ago. Updated about 1 month ago.

Web Interface
Target version:
Start date:
Due date:
% Done:


Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
Affected Architecture:


The NDP Table in the gui is not listing the hostname, while ndp -a from cmd line does.

See this thread.


ndptable.jpg (66.9 KB) ndptable.jpg JohnPoz _, 06/29/2022 07:31 AM
fixed.jpg (59.4 KB) fixed.jpg JohnPoz _, 06/29/2022 12:16 PM
clipboard-202207021056-wabip.png (16.1 KB) clipboard-202207021056-wabip.png Lev Prokofev, 07/02/2022 02:56 AM
Actions #1

Updated by Jim Pingle about 2 months ago

  • Project changed from pfSense Plus to pfSense
  • Category changed from Web Interface to Web Interface
  • Assignee set to Jim Pingle
  • Target version set to 2.7.0
  • Affected Plus Version deleted (22.05)
  • Plus Target Version set to 22.11

Looks like for some reason _getHostName() is forcing the DNS lookup to use -6 when it shouldn't, as that controls how the DNS lookup is made to the DNS server, not the type of address being passed.

This seems to fix it for me:

diff --git a/src/etc/inc/ b/src/etc/inc/
index 079480c674..28db31a88c 100644
--- a/src/etc/inc/
+++ b/src/etc/inc/
@@ -2802,8 +2802,7 @@ function _getHostName($mac, $ip) {
        } else if ($dhcpip[$ip]) {
                return $dhcpip[$ip];
        } else {
-               $ipproto = (is_ipaddrv4($ip)) ? '-4 ' : '-6 ';
-               exec("/usr/bin/host -W 1 " . $ipproto . escapeshellarg($ip), $output);
+               exec("/usr/bin/host -W 1 " . escapeshellarg($ip), $output);
                if (preg_match('/.*pointer ([A-Za-z_0-9.-]+)\..*/', $output[0], $matches)) {
                        if ($matches[1] <> $ip) {
                                return $matches[1];

I need to look through the history and see why it was trying to pass -4 or -6, there may be some other case where that helps that I'm not seeing, or maybe it was an attempt to fix some other behavior that needs a different approach.

Actions #2

Updated by Jim Pingle about 2 months ago

Looking at #11512 and aa1936eefc251b5330e7392f3b1fbc23a006a400 where that was added, it isn't necessary. There is a place in another function where it was helpful when connecting to a specific DNS server, but this is not connecting to a specific DNS server, just trying to resolve a certain kind of address which doesn't require forcing the DNS request to use a specific address family. I'll commit the change above shortly.

Actions #3

Updated by Jim Pingle about 2 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #4

Updated by JohnPoz _ about 2 months ago

Jim - just to let you know, applied this and seems to be working now. Thanks for such a quick response!

Actions #6

Updated by Jim Pingle about 1 month ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF