Skip to content

IPv6 address formating creates invalid IPv6 address strings #1092

@Berengal

Description

@Berengal

Describe the bug
The ipv6 address formatting of the displayed ipv6 addresses on the status page is incorrect.
For example, the IP of my unit is formatted as "2a0d:9c42::9:0000:5acf:79ff:fe9c:8c5a". The DNS address is formatted as "2a0d:9c42::9:0000:0000:0000:0053:0001"

There are multiple issues here, but the one that creates an incorrect string is putting a double colon (::) when all eight hextets are displayed.

The other issues, which don't create a technically incorrect string, but doesn't follow the guidelines for formatting human-readable addresses, are:

  1. Not stripping leading zeroes
  2. Not (correctly) grouping consecutive zero-hextets into the double colon.

Speculating, I think the assigned IP address needs a hextet with leading zeroes to trigger the bug.

To Reproduce
Steps to reproduce the behavior:

  1. Enable IPv6 in the settings
  2. (Possibly assign an IP address with multiple leading zeroes in an otherwise non-zero hextet)
  3. Look at the formatted IPv6 addresses on the status page

Expected behavior
IPv6 address strings are at minimum valid, but should preferably follow guidelines for human-readable address formatting.

Screenshots
Image

Hardware information:

  • AMS reader: Pow-U+

Relevant firmware information:

  • Version: 2.5.3

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions