Project

General

Profile

Actions

Bug #6540

closed

Virtual IPs -> Edit does not allow upper-case IPv6 digits

Added by Bruce Simpson almost 8 years ago. Updated over 4 years ago.

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

0%

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

Description

I noticed that the address fields in the Virtual IPs edit screen reject upper-case hex digits in IPv6 addresses.

This may just be a symptom of how the PHP check has been coded.

Our ISP normally quote IPv6 addresses in upper case, and I prefer to use this in ACLs for consistency.

This problem may not be present in other IPv6 fields throughout the GUI, and should be fixed, also for consistency.

Actions #1

Updated by Chris Buechler almost 8 years ago

RFC 5952, uppercase is forbidden. This is true in all the screens that accept IPv6 addresses or networks.

We ought to just automatically strtolower though.

Actions #2

Updated by Bruce Simpson almost 8 years ago

Good point re RFC -- I'll have to kick that back to them. It is a Standards Track RFC after all.

Actions #3

Updated by Bruce Simpson almost 8 years ago

Specific text is in https://tools.ietf.org/html/rfc5952#section-4.3

Kicking back to ISP (who may blame their IPAM vendor.)

Actions #4

Updated by Phillip Davis almost 8 years ago

At the moment the user can input a "full" IPv6 address "uncompressed" and it is saved just like that, e.g.:
1:2:3:4:0:0:0:a

Much of the back-end implementation code actually compresses the address from the config, so that often it is the compressed address "1:2:3:4::a" that gets passed into conf files or to command lines.

I think it would be good to compress all entered addresses on entry and thus store them in the standard compressed format.

My suggestion is that we make the following changes:
1) Allow mixed case for entry of IPv6 addresses a-f or A-F.
2) Lowercase all entered addresses and store the lowercase version in the config.
3) Compress all entered addresses and store the compressed version in the config.

Thus, for example, if someone enters this address into an alias:
1:2:3:4:0:0:0:A
it would be stored in the config as:
1:2:3:4::a

On refreshing the alias page, they would see the lowercase-compressed format displayed from the config.

Q1) Is the above the way to go?

Q2) How to implement it?
I think it needs to happen in the PHP that processes a POST from the form. But that means making a common function that does the lowercase+compress_IPv6_address thing (easy) and then editing every form that receives an IPv6 address and calling the function at some appropriate point (lots of *.php to edit). Is there some easier way?

Actions #5

Updated by Jim Pingle over 4 years ago

  • Category set to Web Interface
  • Status changed from New to Resolved

I'm pretty sure this was all fixed in https://github.com/pfsense/pfsense/pull/3199 and maybe additional PRs.

Actions

Also available in: Atom PDF