Re: [Anima-signaling] else clause in msg processing, or: where are the errors?

Brian E Carpenter <brian.e.carpenter@gmail.com> Thu, 13 October 2016 01:07 UTC

Return-Path: <brian.e.carpenter@gmail.com>
X-Original-To: anima-signaling@ietfa.amsl.com
Delivered-To: anima-signaling@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 26C22129566 for <anima-signaling@ietfa.amsl.com>; Wed, 12 Oct 2016 18:07:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 Oot1mePm5xTh for <anima-signaling@ietfa.amsl.com>; Wed, 12 Oct 2016 18:07:30 -0700 (PDT)
Received: from mail-pf0-x22f.google.com (mail-pf0-x22f.google.com [IPv6:2607:f8b0:400e:c00::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 75940129656 for <anima-signaling@ietf.org>; Wed, 12 Oct 2016 18:07:30 -0700 (PDT)
Received: by mail-pf0-x22f.google.com with SMTP id s8so26420584pfj.2 for <anima-signaling@ietf.org>; Wed, 12 Oct 2016 18:07:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:organization:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=INCLOVp6/xIQbAaDwPnqm7dUBe++5aM49T64flvXLyI=; b=I4lJbNgaKHPDJ778erJ4bW1OOBFG1MSefgVaiqd3g+jXqFdmzdldXM11IQwQh+pF4D Q0nhkmNu6LD+WJMD0zvZc/z7obmIejHZjaQLhkvC+5OkHiOrheIbkCM2wcGvdR+APk6j BCzR+lgiJPRjdjo8d7d4xsmAk2tCKrkcWy5CGN5oSQPM22cIHFLnJGsnL90h06s75pQ3 XoWj2rcpDlUhWLvK6j+vovtk0XgbQDAFY/b0bQXrK94/eY5bXS42XQseot4QjLpu3oZw yBTZlstu0syvWgm0oTVqXmxR5SAu/sVLolx3dlY1Ppc9iUV6q0hCsBU8ggZjMQdBLx9K omJw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=INCLOVp6/xIQbAaDwPnqm7dUBe++5aM49T64flvXLyI=; b=jsAOOCuC2J+UrzN4ZvMU5GMQu/nLIt5Pjxvh+we8tKcF5TL75z3HNdYK4ndlkOsx47 yZWUYnPLiqwTUI7merJ/kxKXo8yoUY7k5kqI+T6ShAjLHNcvJH6PoQGIlJGwbTgtJS1T nl8NjSHCD/SRAXEwkhXJLn8OXJJSG3vGzcSiUQ3yxaUck0TpXitlnusFJJJNLW88GzZo R7a0v1UIrBZxyYKWwhMBfBe1/R2j1wHY4njsyZyrT/1RlisbIlEiY0Gba3uc/ZKQJI8h eNoyyTPB6Ti6j85732iZwlsSCso+vyVj72t6EHFiUCGyYRWomWxKmBxyH8E8HOw2n/m5 99LQ==
X-Gm-Message-State: AA6/9RmaDcMubiO5UvuixCFe+WZZ+MkZSP3+Trx9KwnsC6nj+Wm9tMhqxqegN54YMajcug==
X-Received: by 10.99.96.22 with SMTP id u22mr4957234pgb.137.1476320849839; Wed, 12 Oct 2016 18:07:29 -0700 (PDT)
Received: from [192.168.178.23] ([118.148.112.34]) by smtp.gmail.com with ESMTPSA id h8sm14589987pab.9.2016.10.12.18.07.27 for <anima-signaling@ietf.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Oct 2016 18:07:28 -0700 (PDT)
To: anima-signaling@ietf.org
References: <12062.1476303921@obiwan.sandelman.ca>
From: Brian E Carpenter <brian.e.carpenter@gmail.com>
Organization: University of Auckland
Message-ID: <34a6f1c3-9898-f1d8-70a9-60bfb59e21f2@gmail.com>
Date: Thu, 13 Oct 2016 14:07:33 +1300
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
MIME-Version: 1.0
In-Reply-To: <12062.1476303921@obiwan.sandelman.ca>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/anima-signaling/EZgv183y7ZPtPCthf5iHQnN1p7s>
Subject: Re: [Anima-signaling] else clause in msg processing, or: where are the errors?
X-BeenThere: anima-signaling@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Mailing list for the signaling design team of the ANIMA WG <anima-signaling.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/anima-signaling>, <mailto:anima-signaling-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/anima-signaling/>
List-Post: <mailto:anima-signaling@ietf.org>
List-Help: <mailto:anima-signaling-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/anima-signaling>, <mailto:anima-signaling-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 13 Oct 2016 01:07:32 -0000

On 13/10/2016 09:25, Michael Richardson wrote:
> 
> Looking at my rather minimal GRASP ASA implementation I wondered what I
> should do with msg types I don't understand, or for that matter, with message
> types that are not yet defined.
> 
> I don't see any clear statements in grasp-07 about error replies.
> Maybe I missed it.
> 
> What does one do with an invalid msgtype?  Options are:
>      1) ignore (drop msg)
>      2) die: drop TCP connection
>      3) reply with ???-M_INVALID or something.

I'm not completely sure about this. Sending back an M_INVALID might
risk a loop condition. Silent ignore (or local diagnostic and ignore)
avoids that. I think that's what I coded. Certainly if we abort an
operation, I think we'll always drop the TCP session though.

Note that in a negotiotion session, we can in fact send
M_END with option O_DECLINE and an error string at any time.

You are completely correct that this should be specified.

> I would rather (3), including the errant session-id.
> 
> I'm also a bit concerned that we have no statement about maximum message size.
> As far as I can see, one can send [M_NOOP, 2^31-4ish bytestring, ...] and it
> will be processed and ignored, eating bandwidth and CPU. I'd like to be able
> to sanely allocate/limit space allocated for things.

Well, specifically noop-message = [M_NOOP] so anything after the op-code
is illegal and can be dropped. But, yes, there is no defined limit on
an objective, so for example
flood-message = [M_FLOOD, session-id, initiator, ttl, (locator-option / []), +objective]
could be any length. But the other Michael wants to distribute Intent
of any length as a single lump. So what is a poor protocol designer
supposed to do? Should we leave it to the designer of individual objectives?

(Hmmm... this is a problem that a Python programmer can pretty much ignore,
since objects grow as desired.)

   Brian