]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
dccp: Schedule an Ack when receiving timestamps
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Thu, 4 Sep 2008 05:30:19 +0000 (07:30 +0200)
committerGerrit Renker <gerrit@erg.abdn.ac.uk>
Thu, 4 Sep 2008 05:45:35 +0000 (07:45 +0200)
This schedules an Ack when receiving a timestamp, exploiting the
existing inet_csk_schedule_ack() function, saving one case in the
`dccp_ack_pending()' function.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
net/dccp/dccp.h
net/dccp/options.c

index c7370de4c4d5f43d0fb1940742d6d5a025faac04..f9ed0cbd1bf3b2a47d940fb4a7aa3663b59f4568 100644 (file)
@@ -431,7 +431,7 @@ static inline void dccp_update_gss(struct sock *sk, u64 seq)
 static inline int dccp_ack_pending(const struct sock *sk)
 {
        const struct dccp_sock *dp = dccp_sk(sk);
-       return dp->dccps_timestamp_echo != 0 ||
+       return
 #ifdef CONFIG_IP_DCCP_ACKVEC
               (dp->dccps_hc_rx_ackvec != NULL &&
                dccp_ackvec_pending(dp->dccps_hc_rx_ackvec)) ||
index e1c94e2b8be039995fb98307ffeaeea59d7fc4c0..9fe0510f4022d0e3aec843e64ca7ba1b239b7838 100644 (file)
@@ -163,6 +163,8 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
                                      dccp_role(sk), ntohl(opt_val),
                                      (unsigned long long)
                                      DCCP_SKB_CB(skb)->dccpd_ack_seq);
+                       /* schedule an Ack in case this sender is quiescent */
+                       inet_csk_schedule_ack(sk);
                        break;
                case DCCPO_TIMESTAMP_ECHO:
                        if (len != 4 && len != 6 && len != 8)