Project

General

Profile

Bug #6585

status_logs_filter.php ipv6 support (reverse lookup)

Added by Luca Moncelli almost 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
Start date:
07/07/2016
Due date:
% Done:

100%

Estimated time:
Affected Version:
All
Affected Architecture:

Description

status_logs_filter.php reverse lookup lacks IPv6 support,
"i" click to resolve doesn't returs any info for IPv6 address.

Associated revisions

Revision 30df6b72 (diff)
Added by Phillip Davis almost 3 years ago

Fix #6585 Do not use [] syntax for lookups

IPv6 address plus port is displayed with the format [1:2::3]:80 - the address is in square brackets followed by colon and the port number. This is necessary to disambiguate the port from the address, a good thing. But it messes up the use of the IPv6 address for reverse lookup.
Keep the "raw" format of the IPv6 address pass that to the reverse lookup code, and use it for generating the htmlclass names that enable the answer to be slotted in for display.

Revision d5861220 (diff)
Added by Phillip Davis almost 3 years ago

Fix #6585 Do not use [] syntax for lookups

IPv6 address plus port is displayed with the format [1:2::3]:80 - the address is in square brackets followed by colon and the port number. This is necessary to disambiguate the port from the address, a good thing. But it messes up the use of the IPv6 address for reverse lookup.
Keep the "raw" format of the IPv6 address pass that to the reverse lookup code, and use it for generating the htmlclass names that enable the answer to be slotted in for display.

History

#1 Updated by Phillip Davis almost 3 years ago

The IPv6 addresses there are displayed using the [1:2::3]:80 format with [IPv6-address]:port which is good for display. But the code seems to be trying to resolve the IPv6 address with the square brackets around it.

I don't have IPv6 resolution where I am right now, so can;t really test. But the change in this pull request at least makes it now come back with "Cannot resolve" on the GUI, where previously it just appeared to do nothing.
https://github.com/pfsense/pfsense/pull/3047

Can you test and confirm if it works or not?

Note: Once a fix is confirmed for this, the same issue needs to be checked in other places where IPv6 reverse lookups are done.

#2 Updated by Luca Moncelli almost 3 years ago

It works!
Now for ipv6 addresses ptr records are returned,
and in case of no prt "Cannot resolve".
Great work, thanks!

#3 Updated by Phillip Davis almost 3 years ago

Thanks for testing.
The Firewall Log Dynamic view does not have the reverse lookup buton, so it won't be broken!
The dashboard Firewall Log widget works a bit differently for reverse lookups, taking the user to the Diagnostics DNS Lookup page and filling in the address. That is doing the right thing with an IPv6 address - no square brackets around it.
So I think this place in status_logs_filter.php is the only place to fix.

#4 Updated by Chris Buechler almost 3 years ago

  • Status changed from New to Feedback
  • Target version set to 2.3.2

Merged, thanks Phil.

#5 Updated by Phillip Davis almost 3 years ago

  • % Done changed from 0 to 100

#6 Updated by Phillip Davis almost 3 years ago

This issue could be changed from "feature" to "bug".

#7 Updated by Renato Botelho almost 3 years ago

  • Tracker changed from Feature to Bug

#8 Updated by Renato Botelho almost 3 years ago

  • Status changed from Feedback to Resolved

#9 Updated by Chris Buechler almost 3 years ago

  • Affected Version set to All

Also available in: Atom PDF