Skip to content

Commit

Permalink
dccp: schedule an Ack when receiving timestamps
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gerrit Renker committed Oct 12, 2010
1 parent d196c9a commit ecdfbda
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions net/dccp/dccp.h
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,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 ||
(dp->dccps_hc_rx_ackvec != NULL &&
return (dp->dccps_hc_rx_ackvec != NULL &&
dccp_ackvec_pending(dp->dccps_hc_rx_ackvec)) ||
inet_csk_ack_scheduled(sk);
}
Expand Down
2 changes: 2 additions & 0 deletions net/dccp/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ecdfbda

Please sign in to comment.