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.
Description
When packet containing following bytes is parsed
61 0a 00 40 20 01 15 30 10 0e
usingrfc3162.FramedIPv6Prefix_Get
, the error is returned in the inner functionradius.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.