Re: [tram] Fwd: New Version Notification for draft-johnston-tram-stun-origin-01.txt

John Selbie <john@selbie.com> Fri, 07 February 2014 20:35 UTC

Return-Path: <john@selbie.com>
X-Original-To: tram@ietfa.amsl.com
Delivered-To: tram@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B39C31A04BE for <tram@ietfa.amsl.com>; Fri, 7 Feb 2014 12:35:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level:
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PH2HxHrmPAab for <tram@ietfa.amsl.com>; Fri, 7 Feb 2014 12:35:08 -0800 (PST)
Received: from mail-ob0-f178.google.com (mail-ob0-f178.google.com [209.85.214.178]) by ietfa.amsl.com (Postfix) with ESMTP id B2DF31A0478 for <tram@ietf.org>; Fri, 7 Feb 2014 12:35:08 -0800 (PST)
Received: by mail-ob0-f178.google.com with SMTP id wn1so4586295obc.37 for <tram@ietf.org>; Fri, 07 Feb 2014 12:35:08 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=MKgvYMQsv34OUSIAHQx8xONjcOsfAHMSLFADvi7pjcI=; b=INGTp/u1xVN90nel4mHLW7eGNAXxXwMbM7Wm0I5b6YhG3TetoAxfZwZEVDVHb7ReN1 62C3q7HnsEn0PusLhlR9B8MWmmIjzzfSJs5gpVYo/L+oSFCpyu4yEJudYl8/GBoLvbKN ytmKrO+xH4s4/8Jvc1McRfd0F08inFAmkLQbY5X4+mv9sPsTWzsPGsePJ8nDH4i1DWmO t87OmjU1sV/BUSrS1KMGtmeFAMEA86ibj+II0EwS66G4VIYfd+pkXR7SWL4HyWlu16qV a6cLRUnKDxixpkODydNvMSpnjbgwckWXZqW+MViVidrKmEJzdbtiukfLJW9ja0novPsB us+A==
X-Gm-Message-State: ALoCoQmQ0Xjxs8UXb/sT/66ATGkiKA1z2yQhcCPbQVatCV5mVFHufTZSjFU37jL0CwmgAD5IuqK9
MIME-Version: 1.0
X-Received: by 10.182.196.3 with SMTP id ii3mr14259028obc.11.1391805308331; Fri, 07 Feb 2014 12:35:08 -0800 (PST)
Received: by 10.76.34.131 with HTTP; Fri, 7 Feb 2014 12:35:08 -0800 (PST)
In-Reply-To: <CAP8pQQvnEFmE1xrM_=a1dVMhd5acH_whRrdGRZq=-hoUig1DuA@mail.gmail.com>
References: <20140206202155.28963.48259.idtracker@ietfa.amsl.com> <CAKhHsXGcewhs6mk8PRVXeUB9BFwDRM0xZ297rckU+H4jjy819A@mail.gmail.com> <52F4E7FA.70600@viagenie.ca> <CAP8pQQvnEFmE1xrM_=a1dVMhd5acH_whRrdGRZq=-hoUig1DuA@mail.gmail.com>
Date: Fri, 07 Feb 2014 12:35:08 -0800
Message-ID: <CAP8pQQvhBqaV9zMqHw+Ntuy593fs9VJ398bKhVZxf7ioDy=-jA@mail.gmail.com>
From: John Selbie <john@selbie.com>
To: Simon Perreault <simon.perreault@viagenie.ca>
Content-Type: multipart/alternative; boundary="089e015383e4fffb0a04f1d6ecbe"
Cc: tram@ietf.org
Subject: Re: [tram] Fwd: New Version Notification for draft-johnston-tram-stun-origin-01.txt
X-BeenThere: tram@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Discussing the creation of a Turn Revised And Modernized \(TRAM\) WG, which goal is to consolidate the various initiatives to update TURN and STUN." <tram.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tram>, <mailto:tram-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tram/>
List-Post: <mailto:tram@ietf.org>
List-Help: <mailto:tram-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tram>, <mailto:tram-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 07 Feb 2014 20:35:12 -0000

Additionally, one other thing as an implementation note.

STUN attributes are expected to align on 4-byte boundaries.  The way
padding applies to the LENGTH field of each STUN attribute differs between
RFC 3489 and RFC 5389. Explicit attribute padding in RFC 3489 vs implicit
padding between attributes in RFC 5389.

If the length of the ORIGIN value is not a multiple of 4, this may break
compatibility with RFC 3489.  STUN servers written for RFC 3489 may
encounter a parsing error when servicing a binding request from such a
client that includes an ORIGIN attribute with a length not divisible by 4.
(Can't recall what Vovida stund.097 does, but I remember hitting this issue
during the development of stuntman).

This is not a new issue for STUN. Implementers should take note of this
legacy requirement if the server responding to binding requests can not be
assumed to be RFC 5389 compliant. The workaround is to explicitly pad the
string attribute with zero's and have it's length field adjusted
accordingly. There's a presumption with this workaround that the server
treats the attribute bytes as a "C" string and ignores the extra zero bytes
when processing it.

jrs




On Fri, Feb 7, 2014 at 9:08 AM, John Selbie <john@selbie.com> wrote:

> One minor nit to add.  Be deliberate on distinguishing between "type" vs.
> "value" fields when explaining the new attribute.  The text below
> references section 15 of RFC 5389. That section shows the STUN attribute
> format with specified fields labeled "type" and "value".  The draft tends
> to use the words "type" and "value" interchangeably in the paragraph below.
>  It can be inferred by context, but I suggest being more explicit and
> consistent with the other attribute definitions in section 15 of 5389. That
> is, make sure that "0x802F" is for the "type" field and that the "value"
> field is understood to be a string.
>
> Change this text:
>
>    This specification defines a new Attribute to the STUN protocol
>    [RFC5389].  The attribute is called ORIGIN and uses the syntax
>    defined in Section 15 of [RFC5389].  A STUN Attribute type is a hex
>    number in the range 0x0000 - 0xFFFF.  The ORIGIN attribute value is
>    0x802F, chosen in the comprehension optional range.
>
>
> To this:
>    This specification defines a new Attribute to the STUN protocol
>    [RFC5389].  The attribute is called ORIGIN and uses the syntax
>    defined in Section 15 of [RFC5389].  The number used for the this
>    in the type field is 0x802F, chosen in the comprehension optional range.
>    The value of ORIGIN is a variable-length value.  It MUST contain a
>    UTF-8 [RFC3629] encoded sequence of characters less than N bytes.
>
> Where "N" is some reasonable number between up 65535.
>
> jrs
>
>
>
> On Fri, Feb 7, 2014 at 6:04 AM, Simon Perreault <
> simon.perreault@viagenie.ca> wrote:
>
>> Le 2014-02-07 08:10, Alan Johnston a écrit :
>> > We have updated the STUN Origin draft.  We have tried to incorporate all
>> > the feedback we have received to date.
>>
>> I'm a fan of the new text. Very well written.
>>
>> A nit: please s/URL/URI/g
>>
>> Thanks,
>> Simon
>> --
>> DTN made easy, lean, and smart --> http://postellation.viagenie.ca
>> NAT64/DNS64 open-source        --> http://ecdysis.viagenie.ca
>> STUN/TURN server               --> http://numb.viagenie.ca
>> _______________________________________________
>> tram mailing list
>> tram@ietf.org
>> https://www.ietf.org/mailman/listinfo/tram
>>
>
>