Discussion:
draft-ietf-sip-ipv6-abnf-fix-04
Dale Worley
2010-01-29 16:41:27 UTC
Permalink
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


_______________________________________________
Sip mailing list https://www.ietf.org/mailman/listinfo/sip
This list is for NEW development of the core SIP Protocol
Use sip-***@cs.columbia.edu for questions on current sip
Use ***@ietf.org for new developments on the application of sip
Vijay K. Gurbani
2010-01-29 17:16:35 UTC
Permalink
Post by Dale Worley
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.
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/
_______________________________________________
Sip mailing list https://www.ietf.org/mailman/listinfo/sip
This list is for NEW development of the core SIP Protocol
Use sip-***@cs.columbia.edu for questions on current sip
Use ***@ietf.org for new developments on the application of sip
Dale Worley
2010-01-29 17:52:41 UTC
Permalink
Post by Vijay K. Gurbani
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.
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


_______________________________________________
Sip mailing list https://www.ietf.org/mailman/listinfo/sip
This list is for NEW development of the core SIP Protocol
Use sip-***@cs.columbia.edu for questions on current sip
Use ***@ietf.org for new developments on the application of sip
Vijay K. Gurbani
2010-01-29 20:40:53 UTC
Permalink
Robert: Please see question directed to you at the end of this
email.
Post by Dale Worley
As long as we're explicating the syntax, it seems reasonable to
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
--
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/
_______________________________________________
Sip mailing list https://www.ietf.org/mailman/listinfo/sip
This list is for NEW development of the core SIP Protocol
Use sip-***@cs.columbia.edu for questions on current sip
Use ***@ietf.org for new developments on the application of sip
Robert Sparks
2010-01-29 20:48:43 UTC
Permalink
No, I don't think trying to make that syntax change is appropriate for
this draft at this point
in its life-cycle.

RjS
Post by Vijay K. Gurbani
Robert: Please see question directed to you at the end of this
email.
Post by Dale Worley
As long as we're explicating the syntax, it seems reasonable to
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
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
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
--
Vijay K. Gurbani, Bell Laboratories, Alcatel-Lucent
1960 Lucent Lane, Rm. 9C-533, Naperville, Illinois 60566 (USA)
Web: http://ect.bell-labs.com/who/vkg/
_______________________________________________
Sip mailing list https://www.ietf.org/mailman/listinfo/sip
This list is for NEW development of the core SIP Protocol
Use sip-***@cs.columbia.edu for questions on current sip
Use ***@ietf.org for new developments on the application of sip
Brett Tate
2010-01-29 21:17:55 UTC
Permalink
It looks like draft-ietf-sip-ipv6-abnf-fix-04 section 3.1 already does the syntax adjustment for IPv4address.
-----Original Message-----
Robert Sparks
Sent: Friday, January 29, 2010 3:49 PM
To: Vijay K. Gurbani
Subject: Re: [Sip] draft-ietf-sip-ipv6-abnf-fix-04
No, I don't think trying to make that syntax change is appropriate for
this draft at this point
in its life-cycle.
RjS
Post by Vijay K. Gurbani
Robert: Please see question directed to you at the end of this
email.
Post by Dale Worley
As long as we're explicating the syntax, it seems reasonable to
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
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
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
_______________________________________________
Sip mailing list https://www.ietf.org/mailman/listinfo/sip
This list is for NEW development of the core SIP Protocol
Use sip-***@cs.columbia.edu for questions on current sip
Use ***@ietf.org for new developments on the application of sip
Vijay K. Gurbani
2010-01-29 21:23:40 UTC
Permalink
Post by Brett Tate
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
--
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/
_______________________________________________
Sip mailing list https://www.ietf.org/mailman/listinfo/sip
This list is for NEW development of the core SIP Protocol
Use sip-***@cs.columbia.edu for questions on current sip
Use ***@ietf.org for new developments on the application of sip
Dale Worley
2010-02-03 19:34:30 UTC
Permalink
Post by Vijay K. Gurbani
Post by Brett Tate
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.
That's true, the revised BNF forbids leading zeros in IPv4address, which
eliminates both sources of potential confusion (some early RFCs and some
C libraries).

Dale


_______________________________________________
Sip mailing list https://www.ietf.org/mailman/listinfo/sip
This list is for NEW development of the core SIP Protocol
Use sip-***@cs.columbia.edu for questions on current sip
Use ***@ietf.org for new developments on the application of sip
Loading...