Re: [hybi] Masking of Control Frames that have a zero length payload.

John Tamplin <jat@google.com> Wed, 22 June 2011 08:27 UTC

Return-Path: <jat@google.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D2CE89E8005 for <hybi@ietfa.amsl.com>; Wed, 22 Jun 2011 01:27:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.976
X-Spam-Level:
X-Spam-Status: No, score=-105.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wi5EuApFG4Sz for <hybi@ietfa.amsl.com>; Wed, 22 Jun 2011 01:27:27 -0700 (PDT)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by ietfa.amsl.com (Postfix) with ESMTP id 055C19E8004 for <hybi@ietf.org>; Wed, 22 Jun 2011 01:27:26 -0700 (PDT)
Received: from wpaz29.hot.corp.google.com (wpaz29.hot.corp.google.com [172.24.198.93]) by smtp-out.google.com with ESMTP id p5M8RQ8M024326 for <hybi@ietf.org>; Wed, 22 Jun 2011 01:27:26 -0700
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1308731246; bh=/MFi7xm1rDQ7gpwvbniwpM+ZZXE=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=NcrDk2TAmRSMe6oKUM2m9h6JoYaHSxMu3HK2qqD5FeI6egJi5rItsfb8eMav5YKul 0EwUap+yvnvDNX0xy+mSQ==
Received: from gyd8 (gyd8.prod.google.com [10.243.49.200]) by wpaz29.hot.corp.google.com with ESMTP id p5M8R7ef005372 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for <hybi@ietf.org>; Wed, 22 Jun 2011 01:27:25 -0700
Received: by gyd8 with SMTP id 8so343764gyd.40 for <hybi@ietf.org>; Wed, 22 Jun 2011 01:27:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=2upztOuYQWFDFtfu9hhZoLj7HicZj5nIeoZyN4SMr58=; b=HQkAZT0vs2PHFam4z8YLOAiwKvK+pbd5uunV1D9HDAH3pvUTVia2SmrxBmAM+1fMpU /FauQXHARQf2hL6TtQQA==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=aeLrmEfPx2zqXflhTTbtpjNFgnMZo4z3zjl5pzJaWsQ/6D3x1Gt7uY3P3lj1GleWW9 GJxTaP2E24/riKU8YJTg==
Received: by 10.150.236.7 with SMTP id j7mr580258ybh.287.1308731245097; Wed, 22 Jun 2011 01:27:25 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.150.49.7 with HTTP; Wed, 22 Jun 2011 01:27:05 -0700 (PDT)
In-Reply-To: <018501cc30b5$1939e460$0a00a8c0@Venus>
References: <018501cc30b5$1939e460$0a00a8c0@Venus>
From: John Tamplin <jat@google.com>
Date: Wed, 22 Jun 2011 04:27:05 -0400
Message-ID: <BANLkTi=p5=rVTS9coxyu5NjMPucXqFC23Q@mail.gmail.com>
To: Len Holgate <len.holgate@gmail.com>
Content-Type: multipart/alternative; boundary="000e0cd240c0f8737e04a648bced"
X-System-Of-Record: true
Cc: hybi@ietf.org
Subject: Re: [hybi] Masking of Control Frames that have a zero length payload.
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Jun 2011 08:27:27 -0000

On Wed, Jun 22, 2011 at 4:19 AM, Len Holgate <len.holgate@gmail.com> wrote:

> I haven't been able to find a previous discussion on this list about this
> point, forgive me if it's already been covered.
>
> 4.3 Client-to-Server Masking
>
> States that "The client MUST mask all frames sent to the server."
>
> 4.5 Control Frames
>
> States that "All control frames MUST have a payload length of 125 bytes or
> less..."
>
> 4.5.1 Close
>
> States that "The Close frame MAY contain a body (the "application data"
> portion of the frame)
>
> Which implies to me that control frames with a zero length payload may
> exist
> but if these are sent from client to server then these MUST still be
> masked,
> which results in the inclusion of a masking key which is not used for
> anything and simply increases the length of the frame for no reason.
>
> Perhaps the inclusion of the rationale behind client to server masking
> would
> clear this up - including the masking key when no data needs to be masked
> makes the control frame unique and unpredictable and perhaps this is the
> reason, but at present it's unclear as to why the above is desirable.
>

IMHO, the utility of a zero-length frame seems low enough that it doesn't
warrant adding a special case to leave off the mask if the payload length is
zero.

-- 
John A. Tamplin
Software Engineer (GWT), Google