Subject: [Sip] draft-ietf-sip-ipv6-abnf-fix-04

From: "Dale Worley" <[email-masked]>
Date: Fri, 29 Jan 2010 11:41:27 -0500

Looking at draft-ietf-sip-ipv6-abnf-fix-04, one thing that is not
mentioned is that some C libraries do not always interpret IPv4
"dotted-decimal" addresses in decimal.  In particular, if a component
starts with "0", it will be interpreted in octal:

        $ ping 047.017.025.061
        PING 047.017.025.061 (39.15.21.49) 56(84) bytes of data.

There are also some usages of "dotted-octal" in early RFCs.

I think one can safely argue that we've always intended for IPv4
addresses to be decimal, but I don't think we've ever stated that, and
the word "decimal" doesn't appear in this draft.

It's possible that there are security aspects of this, too, since an
IPv4 address might be interpreted differently than one would expect it
to be.

Dale

---

From: "Vijay K. Gurbani" <[email-masked]>
Date: Fri, 29 Jan 2010 11:16:35 -0600

> the word "decimal" doesn't appear in this draft.

Dale: Are you suggesting that we mandate that all IPv4 addresses
written in dotted-decimal form be really decimal?  Or just that the
SIP addresses behave so?

I doubt we can do the former through sip-ipv6-abnf-fix; I suspect
we can do the latter if the WG (which one?  sipcore?) or sponsoring
AD agrees on it, although this particular draft is limited to
fixing the IPv6 ABNF.

Thanks,

- vijay
-- 
Vijay K. Gurbani, Bell Laboratories, Alcatel-Lucent
1960 Lucent Lane, Rm. 9C-533, Naperville, Illinois 60566 (USA)
Email: vkg@{alcatel-lucent.com,bell-labs.com,acm.org}
Web:   http://ect.bell-labs.com/who/vkg/

---

From: "Dale Worley" <[email-masked]>
Date: Fri, 29 Jan 2010 12:52:41 -0500

On Fri, 2010-01-29 at 11:16 -0600, Vijay K. Gurbani wrote:
> Are you suggesting that we mandate that all IPv4 addresses

I'm sure that everybody thinks that dotted-decimal strings in SIP URIs
are to be interpreted as decimal.  And for that matter, that series of
HEXDIG's are to be interpreted as hexidecimal.  Whether that is,
strictly speaking, syntax or not, I don't know.  But it appears that
neither of these facts has been stated in plain words, and in an
unpleasantly large number of situations, code may not follow that
convention.

As long as we're explicating the syntax, it seems reasonable to
enunciate what "everybody knows" about its interpretation.

Dale

---

From: "Vijay K. Gurbani" <[email-masked]>
Date: Fri, 29 Jan 2010 14:40:53 -0600

Robert: Please see question directed to you at the end of this
email.

> enunciate what "everybody knows" about its interpretation.

Dale: I am not being an obstructionist here, so please
do not take the comments as such.

I believe that "everybody knows" that dotted-decimal is
well, dotted-"decimal" and not dotted-"octal".  The fact
that some C libraries interpret the leftmost 0 as a
hint to enter octal mode is unfortunate, but I don't see
how putting admonitions here will solve that particular
problem.

That said, one quick observation is that the production rule for
<IPv4address> literal defined in rfc3986 is more close
to your intent than the one defined in rfc3261.  More
specifically, here they are:

rfc3986:

A host identified by an IPv4 literal address is represented in
dotted-decimal notation (a sequence of four decimal numbers in the
range 0 to 255, separated by "."), as described in [RFC1123] by
reference to [RFC0952].  Note that other forms of dotted notation may
be interpreted on some platforms, as described in Section 7.4, but
only the dotted-decimal form of four octets is allowed by this
grammar.

    IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet

    dec-octet   = DIGIT                 ; 0-9
                / %x31-39 DIGIT         ; 10-99
                / "1" 2DIGIT            ; 100-199
                / "2" %x30-34 DIGIT     ; 200-249
                / "25" %x30-35          ; 250-255

rfc3261:

IPv4address    =  1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT

So, we could deprecate the existing rfc3261 syntax for IPv4address
and replace it with the one for rfc3986.

Robert: Is this okay with you?  If so, I can put the above change
in the draft as well.

Thanks,

- vijay

---

From: Robert Sparks <[email-masked]>
Date: Fri, 29 Jan 2010 14:48:43 -0600

No, I don't think trying to make that syntax change is appropriate for  
this draft at this point
in its life-cycle.

RjS

---

From: Brett Tate <[email-masked]>
Date: Fri, 29 Jan 2010 13:17:55 -0800

It looks like draft-ietf-sip-ipv6-abnf-fix-04 section 3.1 already does the syntax adjustment for IPv4address.

> -----Original Message-----
> From: [email-masked] [mailto:[email-masked]] On Behalf Of
> Robert Sparks
> Sent: Friday, January 29, 2010 3:49 PM
> To: Vijay K. Gurbani
> Cc: [email-masked]
> Subject: Re: [Sip] draft-ietf-sip-ipv6-abnf-fix-04
>

---

From: "Vijay K. Gurbani" <[email-masked]>
Date: Fri, 29 Jan 2010 15:23:40 -0600

Brett Tate wrote:
> It looks like draft-ietf-sip-ipv6-abnf-fix-04 section 3.1 already
> does the syntax adjustment for IPv4address.

Ah, never mind.  In that case, I think we have already
addressed Dale's comment then and no more changes are
necessary.

As you can see, I am trying to limit the number of changes
to this draft since it is a carryover from the now defunct
SIP WG where it was WGLC'd.

Thanks,

- vijay