[<prev] [next>] [day] [month] [year] [list]
Message-ID: <48361920.9090309@cn.fujitsu.com>
Date: Fri, 23 May 2008 09:08:48 +0800
From: Wei Yongjun <yjwei@...fujitsu.com>
To: Gerrit Renker <gerrit@....abdn.ac.uk>,
David Miller <davem@...emloft.net>
CC: Wei Yongjun <yjwei@...fujitsu.com>, dccp@...r.kernel.org,
netdev@...r.kernel.org
Subject: [PATCH] DCCP: Fix to handle short sequence numbers packet correctly
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@...fujitsu.com>
Acked-by: Gerrit Renker <gerrit@....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;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists