* [PATCH] DCCP: Fix to reset the connection with Reset Code 5 Option Error while receive invalid option
@ 2008-05-13 8:17 Wei Yongjun
2008-05-13 8:30 ` Gerrit Renker
0 siblings, 1 reply; 6+ messages in thread
From: Wei Yongjun @ 2008-05-13 8:17 UTC (permalink / raw)
To: dccp, netdev
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;
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] DCCP: Fix to reset the connection with Reset Code 5 Option Error while receive invalid option
2008-05-13 8:17 [PATCH] DCCP: Fix to reset the connection with Reset Code 5 Option Error while receive invalid option Wei Yongjun
@ 2008-05-13 8:30 ` Gerrit Renker
2008-05-13 9:57 ` Wei Yongjun
0 siblings, 1 reply; 6+ messages in thread
From: Gerrit Renker @ 2008-05-13 8:30 UTC (permalink / raw)
To: Wei Yongjun; +Cc: dccp, netdev
Quoting Wei Yongjun:
> 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".
>
Ack. However, this has already been fixed in the test tree where dccp_parse()
both sets the Reset code and fills in the Data1..3 fields (not done by this patch).
Within a span of two weeks this is the fourth DCCP patch which fixes bugs
that already have fixes in the DCCP test tree. The same problems are fixed
in two different locations.
If you are doing DCCP work, please consider
http://www.linux-foundation.org/en/Net:DCCP_Testing#How_to_obtain
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] DCCP: Fix to reset the connection with Reset Code 5 Option Error while receive invalid option
2008-05-13 8:30 ` Gerrit Renker
@ 2008-05-13 9:57 ` Wei Yongjun
2008-05-13 10:32 ` Gerrit Renker
0 siblings, 1 reply; 6+ messages in thread
From: Wei Yongjun @ 2008-05-13 9:57 UTC (permalink / raw)
To: Gerrit Renker, Wei Yongjun, dccp, netdev
Hi Gerrit Renker:
Sorry for my stupid patch since I can get the test git tree.
But, Is there any other way to get the git tree? I download a patch
from following URL:
http://www.erg.abdn.ac.uk/users/gerrit/dccp/testing_dccp/test-tree/test-tree_2.6.25.diff.gz
I used this patch to my linux-2.6.25, there is error happend. and it
has compile error too.
Is this patch is based on linux-2.6.25? If I want to send a patch, I
must create my patch base on what version of kernel?
Thanks.
Gerrit Renker wrote:
> Quoting Wei Yongjun:
>
>> 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".
>>
>>
> Ack. However, this has already been fixed in the test tree where dccp_parse()
> both sets the Reset code and fills in the Data1..3 fields (not done by this patch).
>
> Within a span of two weeks this is the fourth DCCP patch which fixes bugs
> that already have fixes in the DCCP test tree. The same problems are fixed
> in two different locations.
>
> If you are doing DCCP work, please consider
> http://www.linux-foundation.org/en/Net:DCCP_Testing#How_to_obtai
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] DCCP: Fix to reset the connection with Reset Code 5 Option Error while receive invalid option
2008-05-13 9:57 ` Wei Yongjun
@ 2008-05-13 10:32 ` Gerrit Renker
2008-05-13 10:52 ` Wei Yongjun
0 siblings, 1 reply; 6+ messages in thread
From: Gerrit Renker @ 2008-05-13 10:32 UTC (permalink / raw)
To: Wei Yongjun; +Cc: Arnaldo, dccp, netdev
>
> Sorry for my stupid patch since I can get the test git tree.
>
There is nothing at all wrong with the patch and I apologise for the
remark, since it is not your fault not to be aware of the test tree.
That was my fault - in at least one of the 4 cases David Miller copied the
changeset over to dccp@vger. I am working with Arnaldo de Melo (the DCCP
maintainer) on a solution for this, to avoid future overlap. It is not
your issue, so sorry.
For the moment the best is to apply this patch and fix the problem in
the mainline variant of net/dccp.
> But, Is there any other way to get the git tree? I download a patch from
> following URL:
>
> http://www.erg.abdn.ac.uk/users/gerrit/dccp/testing_dccp/test-tree/test-tree_2.6.25.diff.gz
> I used this patch to my linux-2.6.25, there is error happend. and it has
> compile error too.
This is possible since the snapshots are taken on the day a new release
comes out. Thanks for the notice, the outdated snapshot will be replaced.
>
> Is this patch is based on linux-2.6.25? If I want to send a patch, I
> must create my patch base on what version of kernel?
>
The test tree tracks the netdev-2.6 kernel and only touches net/dccp. It
can be pulled from
git://eden-feed.erg.abdn.ac.uk/dccp_exp (subtree `dccp')
Gerrit
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] DCCP: Fix to reset the connection with Reset Code 5 Option Error while receive invalid option
2008-05-13 10:32 ` Gerrit Renker
@ 2008-05-13 10:52 ` Wei Yongjun
2008-05-13 11:04 ` Macro mismatch in test tree Gerrit Renker
0 siblings, 1 reply; 6+ messages in thread
From: Wei Yongjun @ 2008-05-13 10:52 UTC (permalink / raw)
To: Gerrit Renker, Wei Yongjun, Arnaldo, dccp, netdev
Hi Gerrit Renker:
I think your should update your patch to avoid compile error:
+#define dccp_feat_print_opt(opt, feat, val, len, mandatory) \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ dccp_pr_debug("%s(%s, ", dccp_feat_oname(opt), dccp_feat_fname(feat));\
+ dccp_feat_printvals(feat, val, len); \
+ dccp_pr_debug_cat(") %s\n", mandatory ? "!" : "");
...snip...
+#else /* ! CONFIG_IP_DCCP_DEBUG */
+#define dccp_feat_print_opt(opt, feat, fval, mandatory)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The first dccp_feat_print_opt() take 5 parameters when
CONFIG_IP_DCCP_DEBUG, but the second one just take 4.
Gerrit Renker wrote:
>> Sorry for my stupid patch since I can get the test git tree.
>>
>>
> There is nothing at all wrong with the patch and I apologise for the
> remark, since it is not your fault not to be aware of the test tree.
>
> That was my fault - in at least one of the 4 cases David Miller copied the
> changeset over to dccp@vger. I am working with Arnaldo de Melo (the DCCP
> maintainer) on a solution for this, to avoid future overlap. It is not
> your issue, so sorry.
>
> For the moment the best is to apply this patch and fix the problem in
> the mainline variant of net/dccp.
>
>
>
>> But, Is there any other way to get the git tree? I download a patch from
>> following URL:
>>
>> http://www.erg.abdn.ac.uk/users/gerrit/dccp/testing_dccp/test-tree/test-tree_2.6.25.diff.gz
>> I used this patch to my linux-2.6.25, there is error happend. and it has
>> compile error too.
>>
> This is possible since the snapshots are taken on the day a new release
> comes out. Thanks for the notice, the outdated snapshot will be replaced.
>
>
>> Is this patch is based on linux-2.6.25? If I want to send a patch, I
>> must create my patch base on what version of kernel?
>>
>>
> The test tree tracks the netdev-2.6 kernel and only touches net/dccp. It
> can be pulled from
> git://eden-feed.erg.abdn.ac.uk/dccp_exp (subtree `dccp')
>
>
> Gerrit
>
>
>
--
--------------------------------------------------
Wei Yongjun
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
8/F., Civil Defense Building, No.189 Guangzhou Road,
Nanjing, 210029, China
TEL: +86+25-86630523-836
COINS: 79955-836
FAX: +86+25-83317685
MAIL: yjwei@cn.fujitsu.com
--------------------------------------------------
This communication is for use by the intended recipient(s) only and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not an intended recipient of this communication, you are hereby notified that any dissemination, distribution or copying hereof is strictly prohibited. If you have received this communication in error, please notify me by reply e-mail, permanently delete this communication from your system, and destroy any hard copies you may have printed
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Macro mismatch in test tree
2008-05-13 10:52 ` Wei Yongjun
@ 2008-05-13 11:04 ` Gerrit Renker
0 siblings, 0 replies; 6+ messages in thread
From: Gerrit Renker @ 2008-05-13 11:04 UTC (permalink / raw)
To: Wei Yongjun; +Cc: dccp, netdev
> The first dccp_feat_print_opt() take 5 parameters when
> CONFIG_IP_DCCP_DEBUG, but the second one just take 4.
>
Thanks :) Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-05-13 11:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-13 8:17 [PATCH] DCCP: Fix to reset the connection with Reset Code 5 Option Error while receive invalid option Wei Yongjun
2008-05-13 8:30 ` Gerrit Renker
2008-05-13 9:57 ` Wei Yongjun
2008-05-13 10:32 ` Gerrit Renker
2008-05-13 10:52 ` Wei Yongjun
2008-05-13 11:04 ` Macro mismatch in test tree Gerrit Renker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).