aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ackvec.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/ackvec.c')
-rw-r--r--net/dccp/ackvec.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/dccp/ackvec.c b/net/dccp/ackvec.c
index 5c76e81658cf..b5981e5f6b00 100644
--- a/net/dccp/ackvec.c
+++ b/net/dccp/ackvec.c
@@ -81,15 +81,16 @@ int dccp_insert_option_ackvec(struct sock *sk, struct sk_buff *skb)
81 if (DCCP_SKB_CB(skb)->dccpd_opt_len + len > DCCP_MAX_OPT_LEN) 81 if (DCCP_SKB_CB(skb)->dccpd_opt_len + len > DCCP_MAX_OPT_LEN)
82 return -1; 82 return -1;
83 83
84 avr = dccp_ackvec_record_new();
85 if (avr == NULL)
86 return -1;
87
88 dccp_timestamp(sk, &now); 84 dccp_timestamp(sk, &now);
89 elapsed_time = timeval_delta(&now, &av->dccpav_time) / 10; 85 elapsed_time = timeval_delta(&now, &av->dccpav_time) / 10;
90 86
91 if (elapsed_time != 0) 87 if (elapsed_time != 0 &&
92 dccp_insert_option_elapsed_time(sk, skb, elapsed_time); 88 dccp_insert_option_elapsed_time(sk, skb, elapsed_time))
89 return -1;
90
91 avr = dccp_ackvec_record_new();
92 if (avr == NULL)
93 return -1;
93 94
94 DCCP_SKB_CB(skb)->dccpd_opt_len += len; 95 DCCP_SKB_CB(skb)->dccpd_opt_len += len;
95 96
@@ -310,7 +311,6 @@ int dccp_ackvec_add(struct dccp_ackvec *av, const struct sock *sk,
310 av->dccpav_buf_ackno = ackno; 311 av->dccpav_buf_ackno = ackno;
311 dccp_timestamp(sk, &av->dccpav_time); 312 dccp_timestamp(sk, &av->dccpav_time);
312out: 313out:
313 dccp_pr_debug("");
314 return 0; 314 return 0;
315 315
316out_duplicate: 316out_duplicate: