* [PATCH] DCCP: Fix to handle short sequence numbers packet correctly
@ 2008-05-22 3:36 Wei Yongjun
2008-05-22 9:07 ` [PATCH] DCCP: Fix to handle short sequence numbers packet Gerrit Renker
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Wei Yongjun @ 2008-05-22 3:36 UTC (permalink / raw)
To: dccp
RFC4340 said:
8.5. Pseudocode
...
If P.type is not Data, Ack, or DataAck and P.X = 0 (the packet
has short sequence numbers), drop packet and return
But DCCP has some mistake to handle short sequence numbers packet, now
it drop packet only if P.type is Data, Ack, or DataAck and P.X = 0.
This patch fixed this problem.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
--- a/net/dccp/ipv4.c 2008-05-18 11:54:29.000000000 -0400
+++ b/net/dccp/ipv4.c 2008-05-18 11:55:51.000000000 -0400
@@ -741,8 +741,8 @@ int dccp_invalid_packet(struct sk_buff *
* If P.type is not Data, Ack, or DataAck and P.X = 0 (the packet
* has short sequence numbers), drop packet and return
*/
- if (dh->dccph_type >= DCCP_PKT_DATA &&
- dh->dccph_type <= DCCP_PKT_DATAACK && dh->dccph_x = 0) {
+ if ((dh->dccph_type < DCCP_PKT_DATA ||
+ dh->dccph_type > DCCP_PKT_DATAACK) && dh->dccph_x = 0) {
DCCP_WARN("P.type (%s) not Data || [Data]Ack, while P.X = 0\n",
dccp_packet_name(dh->dccph_type));
return 1;
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] DCCP: Fix to handle short sequence numbers packet
2008-05-22 3:36 [PATCH] DCCP: Fix to handle short sequence numbers packet correctly Wei Yongjun
@ 2008-05-22 9:07 ` Gerrit Renker
2008-05-22 9:33 ` [PATCH] DCCP: Fix to handle short sequence numbers packet correctly Wei Yongjun
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Gerrit Renker @ 2008-05-22 9:07 UTC (permalink / raw)
To: dccp
> But DCCP has some mistake to handle short sequence numbers packet, now
> it drop packet only if P.type is Data, Ack, or DataAck and P.X = 0.
>
> This patch fixed this problem.
>
> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
I also put this patch into the test tree, as long as it is not in mainline.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] DCCP: Fix to handle short sequence numbers packet correctly
2008-05-22 3:36 [PATCH] DCCP: Fix to handle short sequence numbers packet correctly Wei Yongjun
2008-05-22 9:07 ` [PATCH] DCCP: Fix to handle short sequence numbers packet Gerrit Renker
@ 2008-05-22 9:33 ` Wei Yongjun
2008-05-22 10:07 ` [PATCH] DCCP: Fix to handle short sequence numbers packet Gerrit Renker
2008-05-23 1:08 ` Wei Yongjun
3 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2008-05-22 9:33 UTC (permalink / raw)
To: dccp
Hi Gerrit Renker:
Does this patch need CC to netdev?
Wei Yongjun
Gerrit Renker wrote:
>> But DCCP has some mistake to handle short sequence numbers packet, now
>> it drop packet only if P.type is Data, Ack, or DataAck and P.X = 0.
>>
>> This patch fixed this problem.
>>
>> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
>>
> Acked-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
>
> I also put this patch into the test tree, as long as it is not in mainline.
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] DCCP: Fix to handle short sequence numbers packet
2008-05-22 3:36 [PATCH] DCCP: Fix to handle short sequence numbers packet correctly Wei Yongjun
2008-05-22 9:07 ` [PATCH] DCCP: Fix to handle short sequence numbers packet Gerrit Renker
2008-05-22 9:33 ` [PATCH] DCCP: Fix to handle short sequence numbers packet correctly Wei Yongjun
@ 2008-05-22 10:07 ` Gerrit Renker
2008-05-23 1:08 ` Wei Yongjun
3 siblings, 0 replies; 6+ messages in thread
From: Gerrit Renker @ 2008-05-22 10:07 UTC (permalink / raw)
To: dccp
>
> Does this patch need CC to netdev?
>
Yes, please send patches to both mailing lists.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] DCCP: Fix to handle short sequence numbers packet correctly
2008-05-22 9:07 ` [PATCH] DCCP: Fix to handle short sequence numbers packet Gerrit Renker
@ 2008-05-23 1:08 ` Wei Yongjun
-1 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2008-05-23 1:08 UTC (permalink / raw)
To: dccp
RFC4340 said:
8.5. Pseudocode
...
If P.type is not Data, Ack, or DataAck and P.X = 0 (the packet
has short sequence numbers), drop packet and return
But DCCP has some mistake to handle short sequence numbers packet, now
it drop packet only if P.type is Data, Ack, or DataAck and P.X = 0.
This patch fixed this problem.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
--- a/net/dccp/ipv4.c 2008-05-18 11:54:29.000000000 -0400
+++ b/net/dccp/ipv4.c 2008-05-18 11:55:51.000000000 -0400
@@ -741,8 +741,8 @@ int dccp_invalid_packet(struct sk_buff *
* If P.type is not Data, Ack, or DataAck and P.X = 0 (the packet
* has short sequence numbers), drop packet and return
*/
- if (dh->dccph_type >= DCCP_PKT_DATA &&
- dh->dccph_type <= DCCP_PKT_DATAACK && dh->dccph_x = 0) {
+ if ((dh->dccph_type < DCCP_PKT_DATA ||
+ dh->dccph_type > DCCP_PKT_DATAACK) && dh->dccph_x = 0) {
DCCP_WARN("P.type (%s) not Data || [Data]Ack, while P.X = 0\n",
dccp_packet_name(dh->dccph_type));
return 1;
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH] DCCP: Fix to handle short sequence numbers packet correctly
@ 2008-05-23 1:08 ` Wei Yongjun
0 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2008-05-23 1:08 UTC (permalink / raw)
To: Gerrit Renker, David Miller; +Cc: Wei Yongjun, dccp, netdev
RFC4340 said:
8.5. Pseudocode
...
If P.type is not Data, Ack, or DataAck and P.X == 0 (the packet
has short sequence numbers), drop packet and return
But DCCP has some mistake to handle short sequence numbers packet, now
it drop packet only if P.type is Data, Ack, or DataAck and P.X == 0.
This patch fixed this problem.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
--- a/net/dccp/ipv4.c 2008-05-18 11:54:29.000000000 -0400
+++ b/net/dccp/ipv4.c 2008-05-18 11:55:51.000000000 -0400
@@ -741,8 +741,8 @@ int dccp_invalid_packet(struct sk_buff *
* If P.type is not Data, Ack, or DataAck and P.X == 0 (the packet
* has short sequence numbers), drop packet and return
*/
- if (dh->dccph_type >= DCCP_PKT_DATA &&
- dh->dccph_type <= DCCP_PKT_DATAACK && dh->dccph_x == 0) {
+ if ((dh->dccph_type < DCCP_PKT_DATA ||
+ dh->dccph_type > DCCP_PKT_DATAACK) && dh->dccph_x == 0) {
DCCP_WARN("P.type (%s) not Data || [Data]Ack, while P.X == 0\n",
dccp_packet_name(dh->dccph_type));
return 1;
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-05-23 1:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-22 3:36 [PATCH] DCCP: Fix to handle short sequence numbers packet correctly Wei Yongjun
2008-05-22 9:07 ` [PATCH] DCCP: Fix to handle short sequence numbers packet Gerrit Renker
2008-05-22 9:33 ` [PATCH] DCCP: Fix to handle short sequence numbers packet correctly Wei Yongjun
2008-05-22 10:07 ` [PATCH] DCCP: Fix to handle short sequence numbers packet Gerrit Renker
2008-05-23 1:08 ` [PATCH] DCCP: Fix to handle short sequence numbers packet correctly Wei Yongjun
2008-05-23 1:08 ` Wei Yongjun
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.