Commit ecdfbdab authored by Gerrit Renker's avatar Gerrit Renker

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: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
parent d196c9a5
...@@ -459,8 +459,7 @@ static inline void dccp_update_gss(struct sock *sk, u64 seq) ...@@ -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) static inline int dccp_ack_pending(const struct sock *sk)
{ {
const struct dccp_sock *dp = dccp_sk(sk); const struct dccp_sock *dp = dccp_sk(sk);
return dp->dccps_timestamp_echo != 0 || return (dp->dccps_hc_rx_ackvec != NULL &&
(dp->dccps_hc_rx_ackvec != NULL &&
dccp_ackvec_pending(dp->dccps_hc_rx_ackvec)) || dccp_ackvec_pending(dp->dccps_hc_rx_ackvec)) ||
inet_csk_ack_scheduled(sk); inet_csk_ack_scheduled(sk);
} }
......
...@@ -163,6 +163,8 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq, ...@@ -163,6 +163,8 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
dccp_role(sk), ntohl(opt_val), dccp_role(sk), ntohl(opt_val),
(unsigned long long) (unsigned long long)
DCCP_SKB_CB(skb)->dccpd_ack_seq); DCCP_SKB_CB(skb)->dccpd_ack_seq);
/* schedule an Ack in case this sender is quiescent */
inet_csk_schedule_ack(sk);
break; break;
case DCCPO_TIMESTAMP_ECHO: case DCCPO_TIMESTAMP_ECHO:
if (len != 4 && len != 6 && len != 8) if (len != 4 && len != 6 && len != 8)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment