aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2010-10-11 14:41:13 -0400
committerGerrit Renker <gerrit@erg.abdn.ac.uk>2010-10-12 00:57:43 -0400
commitecdfbdabbe4e0cf0443cbbea2df1bf51bf67f3f3 (patch)
tree1c71220ce0627db499da079eb3d0577c2dd8d064 /net/dccp
parentd196c9a5d4e150cdff675662214c80c69b906958 (diff)
dccp: schedule an Ack when receiving timestamps
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>
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/dccp.h3
-rw-r--r--net/dccp/options.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index 60f4f9622ab3..3eb264b60823 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -459,8 +459,7 @@ static inline void dccp_update_gss(struct sock *sk, u64 seq)
459static inline int dccp_ack_pending(const struct sock *sk) 459static inline int dccp_ack_pending(const struct sock *sk)
460{ 460{
461 const struct dccp_sock *dp = dccp_sk(sk); 461 const struct dccp_sock *dp = dccp_sk(sk);
462 return dp->dccps_timestamp_echo != 0 || 462 return (dp->dccps_hc_rx_ackvec != NULL &&
463 (dp->dccps_hc_rx_ackvec != NULL &&
464 dccp_ackvec_pending(dp->dccps_hc_rx_ackvec)) || 463 dccp_ackvec_pending(dp->dccps_hc_rx_ackvec)) ||
465 inet_csk_ack_scheduled(sk); 464 inet_csk_ack_scheduled(sk);
466} 465}
diff --git a/net/dccp/options.c b/net/dccp/options.c
index d4b1ae0daacb..cd3061813009 100644
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -163,6 +163,8 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
163 dccp_role(sk), ntohl(opt_val), 163 dccp_role(sk), ntohl(opt_val),
164 (unsigned long long) 164 (unsigned long long)
165 DCCP_SKB_CB(skb)->dccpd_ack_seq); 165 DCCP_SKB_CB(skb)->dccpd_ack_seq);
166 /* schedule an Ack in case this sender is quiescent */
167 inet_csk_schedule_ack(sk);
166 break; 168 break;
167 case DCCPO_TIMESTAMP_ECHO: 169 case DCCPO_TIMESTAMP_ECHO:
168 if (len != 4 && len != 6 && len != 8) 170 if (len != 4 && len != 6 && len != 8)