Skip to content

Unable to get IPv6 with prefix from Framed-IPv6-Prefix attribute #118

Description

@dav-komarek

Description

When packet containing following bytes is parsed 61 0a 00 40 20 01 15 30 10 0e using rfc3162.FramedIPv6Prefix_Get, the error is returned in the inner function radius.IPv6Prefix on the line https://github.com/layeh/radius/blob/master/attribute.go#L471. But the provided IPv6 is valid address (2001:1530:100e::/64)

Proposal

The function radius.IPv6Prefix should be able to parse IPv6 of the specified format.

Apparently the check for the length of the byte array (linked) is wrong and should be replaced with check that the prefix is at most 128 bits long.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions