Unable to get IPv6 with prefix from Framed-IPv6-Prefix attribute
dav-komarek opened this issue · 2 comments
dav-komarek commented
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.
dav-komarek commented
Please check 1006025#r134862652.