All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eddie Kohler <kohler@cs.ucla.edu>
To: dccp@vger.kernel.org
Subject: Re: [PATCH] DCCP: Fix to handle invalid packets in REQUEST state
Date: Thu, 31 Jul 2008 16:14:31 +0000	[thread overview]
Message-ID: <4891E4E7.1050003@cs.ucla.edu> (raw)
In-Reply-To: <488FF324.6050706@cn.fujitsu.com>

Wei,

Wei Yongjun wrote:
>>> 1. If invalid Dccp-DataAck packets is received in the REQUEST state, the  
>>> socket just send back Dccp-Rest with invalid packet error, but the  
>>> socket is not reset, Dccp-Request will be continue retranmitted. The  
>>> procedure is like this:
>>>
>>> Endpoint A                   Endpint B
>>>         <-----------------  Request
>>> DataAck  ----------------->          <-----------------  Reset (invalid 
>>> packet)
>>>         <-----------------  Request (retranmit)
>>>
>>>     
>> This is not a bug but as far as I know correct behaviour. The DataAck
>> could be from a previous incarnation of the same connection, or it could
>> be an erratic packet. RFC 4340, 5.6 says about this error code
>>  "Packet Error"
>>    A valid packet arrived with unexpected type.  For example, a
>>    DCCP-Data packet with valid header checksum and sequence numbers
>>    arrived at a connection in the REQUEST state. 
>>
>> The client keeps on retransmitting the Request since this is a
>> requirement from 8.1.3; the number of retransmissions is limited
>> by net.dccp.default.request_retries.
>>
>> Hence this case is in principle correct.
> 
> This case is correct. 7.5.6 has an final example demonstrates recovery
> from a half-open connection. The difference is that Dccp-Sync is
> received in REQUEST state.
> This make me confusion. When to sent reset not close the connection,
> when to sent reset and need close the connection?

A sequence-valid Reset would close the connection.  The easiest way to see
this based on the specification (as opposed to the Linux code) is to follow
the pseudocode in Section 8.5 of RFC4340.  This pseudocode also makes clear
that on some error conditions that generate a Reset, the socket should not be
closed.

Eddie

  parent reply	other threads:[~2008-07-31 16:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-30  4:50 [PATCH] DCCP: Fix to handle invalid packets in REQUEST state Wei Yongjun
2008-07-30 16:51 ` Gerrit Renker
2008-07-31  3:29 ` Wei Yongjun
2008-07-31 16:14 ` Eddie Kohler [this message]
2008-08-04 10:46 ` Gerrit Renker
2008-08-18  5:02 ` Wei Yongjun
2008-08-18 16:00   ` net-2.6 [BUG-FIX] [PATCH 1/1] dccp: Fix panic in retransmission mechanism Gerrit Renker
2008-08-19  4:14     ` David Miller
2008-08-18 15:14 ` [PATCH] DCCP: Fix to handle invalid packets in REQUEST state Gerrit Renker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4891E4E7.1050003@cs.ucla.edu \
    --to=kohler@cs.ucla.edu \
    --cc=dccp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.