Re: [Sip] RFC 3261 - 16.10 (CANCEL processing in a Proxy)

"Vijay K. Gurbani" <vkg@bell-labs.com> Tue, 19 April 2011 15:43 UTC

Return-Path: <vkg@bell-labs.com>
X-Original-To: sip@ietfc.amsl.com
Delivered-To: sip@ietfc.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfc.amsl.com (Postfix) with ESMTP id D3FD7E0691 for <sip@ietfc.amsl.com>; Tue, 19 Apr 2011 08:43:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.592
X-Spam-Level:
X-Spam-Status: No, score=-105.592 tagged_above=-999 required=5 tests=[AWL=0.707, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([208.66.40.236]) by localhost (ietfc.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LQXKvI2-lLms for <sip@ietfc.amsl.com>; Tue, 19 Apr 2011 08:43:16 -0700 (PDT)
Received: from ihemail2.lucent.com (ihemail2.lucent.com [135.245.0.35]) by ietfc.amsl.com (Postfix) with ESMTP id E5827E0664 for <sip@ietf.org>; Tue, 19 Apr 2011 08:43:15 -0700 (PDT)
Received: from usnavsmail3.ndc.alcatel-lucent.com (usnavsmail3.ndc.alcatel-lucent.com [135.3.39.11]) by ihemail2.lucent.com (8.13.8/IER-o) with ESMTP id p3JFhD7j003156 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 19 Apr 2011 10:43:13 -0500 (CDT)
Received: from umail.lucent.com (umail-ce2.ndc.lucent.com [135.3.40.63]) by usnavsmail3.ndc.alcatel-lucent.com (8.14.3/8.14.3/GMO) with ESMTP id p3JFhD27005422 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 19 Apr 2011 10:43:13 -0500
Received: from shoonya.ih.lucent.com (shoonya.ih.lucent.com [135.185.238.233]) by umail.lucent.com (8.13.8/TPES) with ESMTP id p3JFhDFD024197; Tue, 19 Apr 2011 10:43:13 -0500 (CDT)
Message-ID: <4DADAE0F.7090404@bell-labs.com>
Date: Tue, 19 Apr 2011 10:45:19 -0500
From: "Vijay K. Gurbani" <vkg@bell-labs.com>
Organization: Bell Laboratories, Alcatel-Lucent
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9
MIME-Version: 1.0
To: Iñaki Baz Castillo <ibc@aliax.net>
References: <BANLkTi=mob149EFPTffkCUa+j-2dd=9k7A@mail.gmail.com> <4DADA292.6060906@bell-labs.com> <BANLkTindAUS=ArC0C12Xd8UzYUrFEJpoGw@mail.gmail.com>
In-Reply-To: <BANLkTindAUS=ArC0C12Xd8UzYUrFEJpoGw@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
X-Scanned-By: MIMEDefang 2.57 on 135.245.2.35
X-Scanned-By: MIMEDefang 2.64 on 135.3.39.11
Cc: sip@ietf.org
Subject: Re: [Sip] RFC 3261 - 16.10 (CANCEL processing in a Proxy)
X-BeenThere: sip@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Session Initiation Protocol <sip.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/sip>, <mailto:sip-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/sip>
List-Post: <mailto:sip@ietf.org>
List-Help: <mailto:sip-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/sip>, <mailto:sip-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Apr 2011 15:43:17 -0000

On 04/19/2011 10:23 AM, Iñaki Baz Castillo wrote:
> Thanks Vijay. What you say makes lot of sense, however handling a
> CANCEL after crashing is not the only problem in a proxy:
>
> Your text assumes that the proxy doesn't store the transaction
> state/data in a permanent backend so it can not recover it after
> rebooting (sure this is true in 99% of the existing implementations).
> So imagine that, after rebooting in the middle of a INVITE transaction
> in proceeding state, the UAS sends a final response to the UAC:
>
> According to RFC 6026 (which updates RFC 3261):
>
>        When a response is received by an element, it first tries to
>        locate a client transaction (Section 17.1.3) matching the
>        response.  If a transaction is found, the response is handed to
>        the client transaction.  If none is found, the element MUST NOT
>        forward the response.
>
> So the response wouldn't arrive to the UAC (which would also produce
> several issues, similar as if the CANCEL sent by the UAC is not
> forwarded to the UAS).

Ah, this is interesting.  More inline.

> This is, originally RFC 3261 seems to handle the case in which a proxy
> is rebooted (CANCEL forwarded stateless, responses statelessly
> forwarded based on second Via...) but then RFC 6026 arrives an changes
> it (basically to avoid DoS attacks, the same attack that can occur if
> a proxy routes statelessly CANCEL's not matching a transaction). So it
> seems it is not very clear which philosophy to follow, do you agree?
> :)

Since rfc6026 updates rfc3261, I would presume that rfc6026 takes
precedence insofar as sending a response statelessly is concerned.

However, I don't think that rfc6026 says much about whether or not
to generate a 481 to a CANCEL if the CANCEL does not match a pending
transaction.  So go crazy and generate it at a stateful proxy;
from the viewpoint of the UAC, it did receive a final response
for the CANCEL.  It may well never receive a final response
for the INVITE if the proxy
   implements rfc6026
     AND the proxy crashed after sending the INVITE
       AND the proxy did not store transaction state in persistent store
         AND the proxy was promptly brought up and was presented with a
         200 OK (INVITE) that did not match pending transactions

Thanks,

- vijay
-- 
Vijay K. Gurbani, Bell Laboratories, Alcatel-Lucent
1960 Lucent Lane, Rm. 9C-533, Naperville, Illinois 60566 (USA)
Email: vkg@{bell-labs.com,acm.org} / vijay.gurbani@alcatel-lucent.com
Web:   http://ect.bell-labs.com/who/vkg/