All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: dccp@vger.kernel.org
Subject: Re: [PATCH] dccp: Reponsed with Reset when packet is received with
Date: Fri, 22 Aug 2008 01:44:36 +0000	[thread overview]
Message-ID: <48AE1A04.5040504@cn.fujitsu.com> (raw)
In-Reply-To: <48AB7147.2010003@cn.fujitsu.com>

Gerrit Renker wrote:
> Thanks a lot for this patch -- I will integrate it into the test tree
> and upload the updated version (include Acked-by's) tomorrow morning.
>
>   
>> RFC4340 said that if a packet is received with invalid option(such as Mandatory
>> Option as the last byte of the option list),
>>     
> While looking at dccp_parse_options, it seems to me that this case
> (Mandatory as the last option, or a one or more OK-options followed by
>  a faulty one) may use the wrong Reset code, since the `rc' variable
> is assigned different values while looping through the header options.
> Did you notice such a case?
>
> In any case, I will be adding 
>
> --- a/net/dccp/options.c
> +++ b/net/dccp/options.c
> @@ -243,6 +243,7 @@ ignore_option:
>  	}
>  
>  	/* mandatory was the last byte in option list -> reset connection */
> +	rc = DCCP_RESET_CODE_OPTION_ERROR;
>  	if (mandatory)
>  		goto out_invalid_option;
>   

This patch seems not correctly. The patch may look like this :
    while (opt_ptr != opt_end) {         
         rc = DCCP_RESET_CODE_OPTION_ERROR;
    ...
    }

rc may be override by process change option, if is OK, rc become 0. So 
the code "goto out_invalid_option;" in while statements will get reset 
code 0.

Regards
Wei Yongjun


  parent reply	other threads:[~2008-08-22  1:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-20  1:20 [PATCH] dccp: Reponsed with Reset when packet is received with invalid Wei Yongjun
2008-08-20 14:01 ` [PATCH] dccp: Reponsed with Reset when packet is received with Arnaldo Carvalho de Melo
2008-08-20 14:01   ` [PATCH] dccp: Reponsed with Reset when packet is received with invalid option Arnaldo Carvalho de Melo
2008-08-20 17:34 ` [PATCH] dccp: Reponsed with Reset when packet is received with Gerrit Renker
2008-08-22  1:44 ` Wei Yongjun [this message]
2008-08-23 10:50 ` 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=48AE1A04.5040504@cn.fujitsu.com \
    --to=yjwei@cn.fujitsu.com \
    --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.