Project

General

Profile

Bug #6869

Diagnostics / Routes Truncates Destination and Gateway Names

Added by Daryl Morse 4 months ago. Updated 10 days ago.

Status:
Resolved
Priority:
Normal
Category:
Web Interface
Target version:
Start date:
10/20/2016
Due date:
% Done:

100%

Affected version:
2.3.2
Affected Architecture:

Description

When "resolve names" is enabled, resolved destination and gateway names are truncated to 18 characters (e.g., pfSense.localdomai).

When "resolve names" is not enabled, destination and gateway names are at least 28 characters (e.g., fe80::215:5dff:fe5c:e205%hn0).

Associated revisions

Revision ed893ee5
Added by Phillip Davis 4 months ago

Fix #6869 diag_routes resolve names for RELENG_2_3

This code to parse the netstat output and use gethostbyaddr() to reverse resolve names is only needed in RELENG_2_3, so that long names are not truncated. In FreeBSD 10.3 some long resolved names are still being truncated by `netstat`, even though `-W` is specified.

In FreeBSD 11 for pfSense 2.4, `netstat -rW` correctly outputs the full resolved name, even when it is very long. So that all passes through to the Diag Routes GUI display correctly.

History

#1 Updated by Phillip Davis 4 months ago

That is a "feature" of the netstat command, which has annoyed me too. With "-W" it does output the full data in some columns, but not for reverse resolved names.

One way around this is to always just do the netstat command without name resolution, then parse the output and "manually" resolve each item that looks like an IP Address. This PR does that:
https://github.com/pfsense/pfsense/pull/3203

#2 Updated by Renato Botelho 4 months ago

  • Category set to Web Interface
  • Status changed from New to Feedback
  • Assignee set to Renato Botelho
  • Target version set to 2.4.0
  • Affected version set to 2.3.2

PR has been merged, thanks!

#3 Updated by Phillip Davis 4 months ago

  • % Done changed from 0 to 100

#4 Updated by Phillip Davis 4 months ago

Note: This fix has been applied to RELENG_2_3 to fix the issue on FreeBSD 10.3/pfSense 2.3.*

In FreeBSD 11.0 (upcoming pfSense 2.4) the wide output of netstat is improved, the whole text of a reversed-looked-up name is output, and passes through successfully to the GUI. So there is no need for any fix in pfSense master.

In FreeBSD 11.0, netstat has been enhanced to use the "libxo" output formatting, so it can output the data, for example, in JSON format, rather than a text block that has to be carefully parsed. pfSense code that parses and uses netstat output could be re-engineered to output JSON, transfer that to the GUI via AJAX calls... and then have the GUI easily format/display it. But that is an engineering refactoring issue, not this bug fix.

#5 Updated by Jim Pingle about 2 months ago

  • Status changed from Feedback to Resolved

Works

#6 Updated by Jim Pingle 10 days ago

  • Target version changed from 2.4.0 to 2.3.3

Also available in: Atom PDF