Commit 3159afe0 authored by Gerrit Renker's avatar Gerrit Renker Committed by David S. Miller

[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: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0c869620
...@@ -629,16 +629,14 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb, ...@@ -629,16 +629,14 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
return 0; return 0;
/* /*
* Step 7: Check for unexpected packet types * Step 7: Check for unexpected packet types
* If (S.is_server and P.type == CloseReq) * If (S.is_server and P.type == Response)
* or (S.is_server and P.type == Response)
* or (S.is_client and P.type == Request) * or (S.is_client and P.type == Request)
* or (S.state == RESPOND and P.type == Data), * or (S.state == RESPOND and P.type == Data),
* Send Sync packet acknowledging P.seqno * Send Sync packet acknowledging P.seqno
* Drop packet and return * Drop packet and return
*/ */
} else if ((dp->dccps_role != DCCP_ROLE_CLIENT && } else if ((dp->dccps_role != DCCP_ROLE_CLIENT &&
(dh->dccph_type == DCCP_PKT_RESPONSE || dh->dccph_type == DCCP_PKT_RESPONSE) ||
dh->dccph_type == DCCP_PKT_CLOSEREQ)) ||
(dp->dccps_role == DCCP_ROLE_CLIENT && (dp->dccps_role == DCCP_ROLE_CLIENT &&
dh->dccph_type == DCCP_PKT_REQUEST) || dh->dccph_type == DCCP_PKT_REQUEST) ||
(sk->sk_state == DCCP_RESPOND && (sk->sk_state == DCCP_RESPOND &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment