From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: dccp@vger.kernel.org
Subject: [PATCH] DCCP: Fix to reset the connection with Reset Code 5 Option
Date: Tue, 13 May 2008 08:17:32 +0000 [thread overview]
Message-ID: <48294E9C.4060209@cn.fujitsu.com> (raw)
If endpoint received invalid option, it must reset the connection with
Reset Code 5 "Option Error", but current kernel send reset with Reset
Code 4 "Packet Error".
This patch fixed this problem. dccp_parse_options() has set reset code
to 5 if option is invalid, so just return 1 to let reset be send with
this reset code.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
--- a/net/dccp/input.c 2008-05-02 15:37:25.000000000 -0400
+++ b/net/dccp/input.c 2008-05-02 15:50:01.000000000 -0400
@@ -428,7 +428,7 @@ static int dccp_rcv_request_sent_state_p
}
if (dccp_parse_options(sk, NULL, skb))
- goto out_invalid_packet;
+ goto out_invalid_option;
/* Obtain usec RTT sample from SYN exchange (used by CCID 3) */
if (likely(dp->dccps_options_received.dccpor_timestamp_echo))
@@ -508,6 +508,7 @@ static int dccp_rcv_request_sent_state_p
out_invalid_packet:
/* dccp_v4_do_rcv will send a reset */
DCCP_SKB_CB(skb)->dccpd_reset_code = DCCP_RESET_CODE_PACKET_ERROR;
+out_invalid_option:
return 1;
}
next reply other threads:[~2008-05-13 8:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-13 8:17 Wei Yongjun [this message]
2008-05-13 8:30 ` [PATCH] DCCP: Fix to reset the connection with Reset Code 5 Gerrit Renker
2008-05-13 9:57 ` [PATCH] DCCP: Fix to reset the connection with Reset Code 5 Option Wei Yongjun
2008-05-13 10:10 ` Wei Yongjun
2008-05-13 10:32 ` [PATCH] DCCP: Fix to reset the connection with Reset Code 5 Gerrit Renker
2008-05-13 10:52 ` [PATCH] DCCP: Fix to reset the connection with Reset Code 5 Option Wei Yongjun
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=48294E9C.4060209@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox