Skip to content

Commit ecdfbda

Browse files
author
Gerrit Renker
committed
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>
1 parent d196c9a commit ecdfbda

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎net/dccp/dccp.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,7 @@ static inline void dccp_update_gss(struct sock *sk, u64 seq)
459459
static inline int dccp_ack_pending(const struct sock *sk)
460460
{
461461
const struct dccp_sock *dp = dccp_sk(sk);
462-
return dp->dccps_timestamp_echo != 0 ||
463-
(dp->dccps_hc_rx_ackvec != NULL &&
462+
return (dp->dccps_hc_rx_ackvec != NULL &&
464463
dccp_ackvec_pending(dp->dccps_hc_rx_ackvec)) ||
465464
inet_csk_ack_scheduled(sk);
466465
}

‎net/dccp/options.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
163163
dccp_role(sk), ntohl(opt_val),
164164
(unsigned long long)
165165
DCCP_SKB_CB(skb)->dccpd_ack_seq);
166+
/* schedule an Ack in case this sender is quiescent */
167+
inet_csk_schedule_ack(sk);
166168
break;
167169
case DCCPO_TIMESTAMP_ECHO:
168170
if (len != 4 && len != 6 && len != 8)

0 commit comments

Comments
 (0)