On Mon, Apr 29, 2019 at 10:48:25AM +0200, Martin Bjorklund wrote: > > I did some digging, and it turns out that we had this type internally > before it was part if ietf-inet-types, where we did not require that > all non-prefix bits were zero, but at one point (after > draft-ietf-netmod-yang-types-00 back in 2008) checked in a fix: > > The confd:ipv4Prefix and confd:ipv6Prefix types now require that all > bits that do not belong to the prefix are set to zero. This is for > compatibility with the corresponding YANG types defined by the IETF > NETMOD working group. > > You may want to see the threads: > > https://mailarchive.ietf.org/arch/msg/netmod/bXL0Mec_ZVVyalmK3pNHkczm6ZI > > https://mailarchive.ietf.org/arch/msg/netmod/3Wz5BPgxZajCZloAOjU-ycfr9Lg > > Specifically Juergen's proposal: > > Require that all bits that are not part of the prefix are set to > zero (192.0.2.8/24 becomes an invalid representation of an IPv4 > prefix) > > I can't find any discussion in the archive about allowing non-zero non-prefix > bits. So I think that the original intention was to be strict in > these types. I agree that the current description text needs > clarification in either case.
Looking at the archive again, the second message seems to indicate that the idea was to require non-prefix bits to be zero for IPv4 but not for IPv6, which could explain why we have the SHOULD text for ip6-prefix but not for ipv4-prefix. In retrospect, having different requirements for non-prefix bits in ipv4-prefix and ip6-prefix sounds somewhat weird. The first message you refer to only indicates that we need to think about canonical formats for the ipvX-prefix types. Since the text does not say that non-zero non-prefix bits are disallowed, I think the clarification I have proposed is a path forward to resolve this. /js -- Juergen Schoenwaelder Jacobs University Bremen gGmbH Phone: +49 421 200 3587 Campus Ring 1 | 28759 Bremen | Germany Fax: +49 421 200 3103 <https://www.jacobs-university.de/> _______________________________________________ netmod mailing list netmod@ietf.org https://www.ietf.org/mailman/listinfo/netmod