* [PATCH 4/4]: Remove duplicate test for CloseReq
@ 2007-11-28 8:35 Gerrit Renker
2007-11-28 14:13 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 2+ messages in thread
From: Gerrit Renker @ 2007-11-28 8:35 UTC (permalink / raw)
To: dccp
[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>
---
net/dccp/input.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -616,16 +616,14 @@ int dccp_rcv_state_process(struct sock *
return 0;
/*
* Step 7: Check for unexpected packet types
- * If (S.is_server and P.type = CloseReq)
- * or (S.is_server and P.type = Response)
+ * If (S.is_server and P.type = Response)
* or (S.is_client and P.type = Request)
* or (S.state = RESPOND and P.type = Data),
* Send Sync packet acknowledging P.seqno
* Drop packet and return
*/
} else if ((dp->dccps_role != DCCP_ROLE_CLIENT &&
- (dh->dccph_type = DCCP_PKT_RESPONSE ||
- dh->dccph_type = DCCP_PKT_CLOSEREQ)) ||
+ dh->dccph_type = DCCP_PKT_RESPONSE) ||
(dp->dccps_role = DCCP_ROLE_CLIENT &&
dh->dccph_type = DCCP_PKT_REQUEST) ||
(sk->sk_state = DCCP_RESPOND &&
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 4/4]: Remove duplicate test for CloseReq
2007-11-28 8:35 [PATCH 4/4]: Remove duplicate test for CloseReq Gerrit Renker
@ 2007-11-28 14:13 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2007-11-28 14:13 UTC (permalink / raw)
To: dccp
Em Wed, Nov 28, 2007 at 08:35:11AM +0000, Gerrit Renker escreveu:
> [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>
Thanks, applied.
- Arnaldo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-11-28 14:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-28 8:35 [PATCH 4/4]: Remove duplicate test for CloseReq Gerrit Renker
2007-11-28 14:13 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox