aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/input.c
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2007-11-28 09:06:04 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:55:14 -0500
commit3159afe0d2c1994392c269cf9dee2797830d016b (patch)
treecae67feeee5c22c74a35a9d704e27679ac507ee2 /net/dccp/input.c
parent0c869620762fea4b3acf6502d9e80840b27ec642 (diff)
[DCCP]: Remove duplicate test for CloseReq
This removes a redundant test for unexpected packet types. In dccp_rcv_state_process it is tested twice whether a DCCP-server has received a CloseReq (Step 7): * first in the combined if-statement, * then in the call to dccp_rcv_closereq(). The latter is necesssary since dccp_rcv_closereq() is also called from __dccp_rcv_established(). This patch removes the duplicate test. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/input.c')
-rw-r--r--net/dccp/input.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/dccp/input.c b/net/dccp/input.c
index fe4b0fbfa508..decf2f21149b 100644
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -629,16 +629,14 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
629 return 0; 629 return 0;
630 /* 630 /*
631 * Step 7: Check for unexpected packet types 631 * Step 7: Check for unexpected packet types
632 * If (S.is_server and P.type == CloseReq) 632 * If (S.is_server and P.type == Response)
633 * or (S.is_server and P.type == Response)
634 * or (S.is_client and P.type == Request) 633 * or (S.is_client and P.type == Request)
635 * or (S.state == RESPOND and P.type == Data), 634 * or (S.state == RESPOND and P.type == Data),
636 * Send Sync packet acknowledging P.seqno 635 * Send Sync packet acknowledging P.seqno
637 * Drop packet and return 636 * Drop packet and return
638 */ 637 */
639 } else if ((dp->dccps_role != DCCP_ROLE_CLIENT && 638 } else if ((dp->dccps_role != DCCP_ROLE_CLIENT &&
640 (dh->dccph_type == DCCP_PKT_RESPONSE || 639 dh->dccph_type == DCCP_PKT_RESPONSE) ||
641 dh->dccph_type == DCCP_PKT_CLOSEREQ)) ||
642 (dp->dccps_role == DCCP_ROLE_CLIENT && 640 (dp->dccps_role == DCCP_ROLE_CLIENT &&
643 dh->dccph_type == DCCP_PKT_REQUEST) || 641 dh->dccph_type == DCCP_PKT_REQUEST) ||
644 (sk->sk_state == DCCP_RESPOND && 642 (sk->sk_state == DCCP_RESPOND &&