Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3159afe0d2c1994392c269cf9dee2797830d016b
Commit:     3159afe0d2c1994392c269cf9dee2797830d016b
Parent:     0c869620762fea4b3acf6502d9e80840b27ec642
Author:     Gerrit Renker <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 28 12:06:04 2007 -0200
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 14:55:14 2008 -0800

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/dccp/input.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/net/dccp/input.c b/net/dccp/input.c
index fe4b0fb..decf2f2 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,
                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 &&
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to