Subject: [netmod] bug in ipv6-address-no-zone

From: Ladislav Lhotka <[email-masked]>
Date: Mon, 29 Apr 2013 14:47:04 +0200

Hi,

the extra pattern in ipv6-address-no-zone (pattern '[0-9a-fA-F:]*';) is probably incorrect because it eliminates the IPv4-mapped addresses, such as ::ffff:1.2.3.4. The correct pattern would be

pattern '[0-9a-fA-F:.]*';

On the other hand, maybe IPv4-mapped addresses deserve a separate type because they are not allowed in all contexts. For example, I believe the IPv6 address configured on an interface should not be an IPv4-mapped address.

Lada

--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C

---

From: Martin Bjorklund <[email-masked]>
Date: Mon, 29 Apr 2013 14:52:26 +0200 (CEST)

Ladislav Lhotka <[email-masked]> wrote:
> Hi,
> 
> the extra pattern in ipv6-address-no-zone (pattern '[0-9a-fA-F:]*';)
> is probably incorrect because it eliminates the IPv4-mapped addresses,
> such as ::ffff:1.2.3.4. The correct pattern would be
> 

This should be

  pattern '[0-9a-fA-F:\.]*';

/martin

---

From: Ladislav Lhotka <[email-masked]>
Date: Mon, 29 Apr 2013 15:04:54 +0200

>  pattern '[0-9a-fA-F:\.]*';

Actually, no, the dot needn't be escaped in character classes (inside brackets).

Lada

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 30 Apr 2013 13:51:41 +0200

> Actually, no, the dot needn't be escaped in character classes (inside brackets).

I think we need to allow for IPv4-mapped addresses and hence the dot
should be added. Where can I find a definite answer whether the dot
needs backslashing or not? The pattern for ipv4-address-no-zone has a
backslashed dot and I like to get things straight. OK, I figure I have
to check "XML Schema Part 2: Datatypes Second Edition"...

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1, 28759 Bremen, Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>

---

From: Ladislav Lhotka <[email-masked]>
Date: Tue, 30 Apr 2013 14:17:06 +0200

> should be added. Where can I find a definite answer whether the dot

But perhaps we should also restrict the pattern so as to allow only IPv4-mapped addresses (::ffff:A.B.C.D), or perhaps also the obsolete IPv4-compatible addresses (::A.B.C.D). Currently, addresses like

2001:1dbf:cafe:f00:301:42:1.2.0.255

are also valid, which may not be correct.

> to check "XML Schema Part 2: Datatypes Second Edition"…

I did it yesterday a found the text not very clear on this, but the derivation of "charClassExpr" eventually contains "XmlCharIncDash", which only excludes left and right square brackets.

In any case, using "\." is OK.

Lada

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 30 Apr 2013 16:20:36 +0200

> are also valid, which may not be correct.

This is a different topic - ipv6-address allows them and hence this is
not an issue for the -no-zone subtype.
 
> In any case, using "\." is OK.

Then I will use \. in both cases.

/js

---

From: Ladislav Lhotka <[email-masked]>
Date: Tue, 30 Apr 2013 16:41:45 +0200

> not an issue for the -no-zone subtype.

Yes, this comment aimed at ipv6-address and ipv6-prefix.

Lada

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 30 Apr 2013 16:54:52 +0200

> Yes, this comment aimed at ipv6-address and ipv6-prefix.

I prefer to not change these definitions (and who knows whether any
other 'mapped' address formats get invented in the future).

/js