V7.21beta [testing] is released!

There seems to be an undocumented behavior change in 7.21beta2 with regards to parsing IPv6 prefix in scripts that unfortunately breaks my scripts that handle dynamic IPv6 prefixes.

In 7.20.1 and earlier versions this:

:put [[:parse ":return $(~::)/64"]]
:put [[:parse ":return $(~::)/60"]] 
:put [[:parse ":return $(~::)/84"]] 
:local prefixLen 48; :put [[:parse ":return $(~::)/$prefixLen"]] 
:put [[:parse ":return ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/64"]]
:local prefixLen 92; :put [[:parse ":return ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/$prefixLen"]]
:put [:typeof [[:parse ":return $(~::)/64"]]]

produced this output:

ffff:ffff:ffff:ffff::/64
ffff:ffff:ffff:fff0::/60
ffff:ffff:ffff:ffff:ffff:f000::/84
ffff:ffff:ffff::/48
ffff:ffff:ffff:ffff::/64
ffff:ffff:ffff:ffff:ffff:fff0::/92
ip6-prefix

and was very handy to generate an IPv6 mask, given a dynamic $prefixLen, that can be later be used to extract/combine the prefix or suffix parts of IPv6 addresses (using AND, OR, NOT operators), depending on the dynamic $prefixLen.

However in 7.21beta2, the same commands above now produce this output:

ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/64
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/60
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/84
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/48
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/64
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/92
ip6-prefix

and all the code that rely on this now break and become useless. Is this change really intentional?

Because the type has not changed (still being ip6-prefix) I would argue that ffff:ffff:ffff::/48 is a valid IPv6 prefix, while ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/48 is not a valid IPv6 prefix at all.