Skip to content

Stuck while trying to get min and max ip for IPV6 range #124

@andrepcg

Description

@andrepcg
ip_range = IPAddress "::ffff:192.194.252.144/126"
ip_range.size
# => 4
ip_range.min.ipv4.address
# => "192.194.252.144"

# Problematic range
ip_range= IPAddress "2a04:4a80::/29"
ip_range.size
# => 633825300114114700748351602688
ip_range.min.address
# Get's stuck calculating the mininum address

Since min is inherited from Enumerable, it compares one IP against every other

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