Skip to content

Invalid IPv6 handling #98

@traxanos

Description

@traxanos

Hi guys,

i have found a bug.

It is allowed to use dot notation in ipv6. The following address is not a mapped ipv6 address.

IPAddress.parse('abcd:9234::1.2.3.4/96').to_string

I got a wrong output
=> ::ffff:9.2.3.4/96

But the correct output must be:
=> abcd:9234::102:304/96

Same problem here:

IPAddress.parse('::1.2.3.4/120').to_string
=> "::ffff:1.2.3.4/120"

Correct output is
=> ::102:304/120

Only
IPAddress.parse('::ffff:1.2.3.4/120') is a mapped ipv6 value!
Only here it is allowed to handle it as an Mapped IPv6 Object with the following output:
=> "::ffff:1.2.3.4/120"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions