[Dime] A tiny bug in Command Code ABNF specification in rfc3588bis-19

Fortune HUANG <fqhuang@huawei.com> Tue, 08 December 2009 06:53 UTC

Return-Path: <fqhuang@huawei.com>
X-Original-To: dime@core3.amsl.com
Delivered-To: dime@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 7EBBB3A693D for <dime@core3.amsl.com>; Mon, 7 Dec 2009 22:53:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 2.804
X-Spam-Level: **
X-Spam-Status: No, score=2.804 tagged_above=-999 required=5 tests=[BAYES_40=-0.185, FH_RELAY_NODNS=1.451, HELO_MISMATCH_COM=0.553, HTML_FONT_FACE_BAD=0.884, HTML_MESSAGE=0.001, RDNS_NONE=0.1]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kJxKTDzB4TlR for <dime@core3.amsl.com>; Mon, 7 Dec 2009 22:53:25 -0800 (PST)
Received: from szxga02-in.huawei.com (unknown [119.145.14.65]) by core3.amsl.com (Postfix) with ESMTP id A18D728C0FD for <dime@ietf.org>; Mon, 7 Dec 2009 22:53:24 -0800 (PST)
Received: from huawei.com (szxga02-in [172.24.2.6]) by szxga02-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0KUB00K28N4DOS@szxga02-in.huawei.com> for dime@ietf.org; Tue, 08 Dec 2009 14:53:01 +0800 (CST)
Received: from huawei.com ([172.24.2.119]) by szxga02-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0KUB005X3N4DAK@szxga02-in.huawei.com> for dime@ietf.org; Tue, 08 Dec 2009 14:53:01 +0800 (CST)
Received: from h36145c ([10.70.39.64]) by szxml04-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTPA id <0KUB0022ZN4DAY@szxml04-in.huawei.com> for dime@ietf.org; Tue, 08 Dec 2009 14:53:01 +0800 (CST)
Date: Tue, 08 Dec 2009 14:53:01 +0800
From: Fortune HUANG <fqhuang@huawei.com>
To: dime@ietf.org
Message-id: <002c01ca77d3$15666f80$4027460a@china.huawei.com>
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
X-Mailer: Microsoft Office Outlook 11
Content-type: multipart/alternative; boundary="Boundary_(ID_e5pX6wJw0PKNsh/8h8mn1Q)"
Thread-index: Acp30xU9qlJo36+fSKealoDVhekQZw==
Subject: [Dime] A tiny bug in Command Code ABNF specification in rfc3588bis-19
X-BeenThere: dime@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Diameter Maintanence and Extentions Working Group <dime.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/dime>, <mailto:dime-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/dime>
List-Post: <mailto:dime@ietf.org>
List-Help: <mailto:dime-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dime>, <mailto:dime-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 08 Dec 2009 06:53:26 -0000

Dear all,
 
I think there is a tiny bug in the Command Code ABNF specification in
rfc3588bis-19.
 
Here is how the Diameter header is defined:
 
  header           = "<" "Diameter Header:" command-id
                     [r-bit] [p-bit] [e-bit] [application-id] ">"
 
  application-id   = 1*DIGIT
 
  command-id       = 1*DIGIT
                     ; The Command Code assigned to the command
  r-bit            = ", REQ"
                     ; If present, the 'R' bit in the Command
                     ; Flags is set, indicating that the message
                     ; is a request, as opposed to an answer.

  p-bit            = ", PXY"
                     ; If present, the 'P' bit in the Command
                     ; Flags is set, indicating that the message
                     ; is proxiable.

  e-bit            = ", ERR"
                     ; If present, the 'E' bit in the Command
                     ; Flags is set, indicating that the answer
                     ; message contains a Result-Code AVP in
                     ; the "protocol error" class.

According to this specification, there is no separator (e.g. a comma)
between the application-id and its previous field.
So here are the legal examples which do not look good:
1) header = <Diameter Header:555, REQ1111111> 
2) header = <Diameter Header:5551111111>
In the latter example, we can't even figure out the values of the command
code and the application-id.
 
There might be three potential solutions to fix the bug (any of them will be
OK for me):
1) simply adding ", " before application-id as follows:
     header           = "<" "Diameter Header:" command-id
                     [r-bit] [p-bit] [e-bit] [", " application-id] ">"
 
2) redefine application-id with a comma as follows: 
       application-id   = ", " 1*DIGIT
3) create a new name for application-id plus the comma as follows:
header           = "<" "Diameter Header:" command-id
                     [r-bit] [p-bit] [e-bit] [a-new-name-x] ">"
a-new-name-x = ", " application-id
 
 
Best regards,
Fortune