ietf-wg-emailcore / emailcore

3 stars 0 forks source link

Erratum 4315: IPv6 ABNF needs updating to align with RFC 5952 and RFC 3986 #27

Closed ietf-svn-bot closed 3 years ago

ietf-svn-bot commented 3 years ago

keyword_SMTP resolution_fixed type_defect | by alexey.melnikov@isode.com


Section 4.1.3 says:

IPv6-full = IPv6-hex 7(":" IPv6-hex)

IPv6-comp = [IPv6-hex 5(":" IPv6-hex)] "::" [IPv6-hex 5(":" IPv6-hex)] ; The "::" represents at least 2 16-bit groups of ; zeros. No more than 6 groups in addition to the ; "::" may be present.

IPv6v4-full = IPv6-hex 5(":" IPv6-hex) ":" IPv4-address-literal

IPv6v4-comp = [IPv6-hex 3(":" IPv6-hex)] "::" [IPv6-hex 3(":" IPv6-hex) ":"] IPv4-address-literal ; The "::" represents at least 2 16-bit groups of ; zeros. No more than 4 groups in addition to the ; "::" and IPv4-address-literal may be present.

Rodrigo Speller suggests that it should be:

IPv6-full = IPv6-hex 7(":" IPv6-hex)

IPv6-comp = "::" [IPv6-hex 6(":" IPv6-hex)] | IPv6-hex "::" [IPv6-hex 5(":" IPv6-hex)] | IPv6-hex 1(":" IPv6-hex) "::" [IPv6-hex 4(":" IPv6-hex)] | IPv6-hex 2(":" IPv6-hex) "::" [IPv6-hex 3(":" IPv6-hex)] | IPv6-hex 3(":" IPv6-hex) "::" [IPv6-hex 2(":" IPv6-hex)] | IPv6-hex 4(":" IPv6-hex) "::" [IPv6-hex 1(":" IPv6-hex)] | IPv6-hex 5(":" IPv6-hex) "::" [IPv6-hex] | IPv6-hex 6(":" IPv6-hex) "::" ; The "::" represents at least one 16-bit groups of ; zeros. No more than 7 groups in addition to the ; "::" may be present.

IPv6v4-full = IPv6-hex 5(":" IPv6-hex) ":" IPv4-address-literal

IPv6v4-comp = ("::" [IPv6-hex 4(":" IPv6-hex) ":"] | IPv6-hex "::" [IPv6-hex 3(":" IPv6-hex) ":"] | IPv6-hex 1(":" IPv6-hex) "::" [IPv6-hex 2(":" IPv6-hex) ":"] | IPv6-hex 2(":" IPv6-hex) "::" [IPv6-hex 1(":" IPv6-hex) ":"] | IPv6-hex 3(":" IPv6-hex) "::" [IPv6-hex ":"] | IPv6-hex 4(":" IPv6-hex) "::") IPv4-address-literal ; The "::" represents at least one 16-bit groups of ; zeros. No more than 5 groups in addition to the ; "::" and IPv4-address-literal may be present.


Issue migrated from trac:27 at 2022-01-31 12:35:46 +0000

ietf-svn-bot commented 3 years ago

@alexey.melnikov@isode.com set component to smtp

ietf-svn-bot commented 3 years ago

@alexey.melnikov@isode.com changed title from Erratum 4315: IPv6 ABNF needs updating to Erratum 4315: IPv6 ABNF needs updating to align with RFC 5952 and RFC 3986

ietf-svn-bot commented 3 years ago

@alexey.melnikov@isode.com commented


Based on RFC 3986 John proposed the following new ABNF:

IPv6-addr = 6( h16 ":" ) ls32 / "::" 5( h16 ":" ) ls32 / [ h16 ] "::" 4( h16 ":" ) ls32 / [ 1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 / [ 2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 / [ 3( h16 ":" ) h16 ] "::" h16 ":" ls32 / [ 4( h16 ":" ) h16 ] "::" ls32 / [ 5( h16 ":" ) h16 ] "::" h16 / [ 6( h16 ":" ) h16 ] "::" ; This definition is consistent with the one for ; URIs [40].

ls32 = ( h16 ":" h16 ) / IPv4address ; least-significant 32 bits of address

h16 = 1*4HEXDIG ; 16 bits of address represented in hexadecimal

This looks very sensible, but we might need to do a few tweaks if we want to use the recommended syntax from RFC 5952, as per:

4.1. Handling Leading Zeros in a 16-Bit Field

Leading zeros MUST be suppressed. For example, 2001:0db8::0001 is not acceptable and must be represented as 2001:db8::1. A single 16- bit 0000 field MUST be represented as 0.

4.3. Lowercase

The characters "a", "b", "c", "d", "e", and "f" in an IPv6 address MUST be represented in lowercase.

This would probably affect h16, to make it clear that leading "0" are prohibited and only lowercase is to be used. (HEXDIG allows uppercase hex at the moment).

ietf-svn-bot commented 3 years ago

@alexey.melnikov@isode.com commented


Based on the mailing list discussion, there seem to be consensus for:

Keep John's change to align with RFC 3986, but don't do any further changes to align with RFC 5952. Also possibly note that there is no alignment with RFC 5952.

ietf-svn-bot commented 3 years ago

@alexey.melnikov@isode.com commented


Add some text to the A/S draft saying that IPv6 syntax is not necessarily canonical, so it doesn't follow recommendations from RFC 5952.

ietf-svn-bot commented 3 years ago

@vesely@tana.it commented


Discussion: https://mailarchive.ietf.org/arch/msg/emailcore/qGd3-MVpYQgmh96bf5dVrQIZPkI

ietf-svn-bot commented 3 years ago

@alexey.melnikov@isode.com changed status from new to closed

ietf-svn-bot commented 3 years ago

@alexey.melnikov@isode.com set resolution to fixed