aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ackvec.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2006-03-21 01:32:06 -0500
committerDavid S. Miller <davem@davemloft.net>2006-03-21 01:32:06 -0500
commit2d0817d11eaec57435feb61493331a763f732a2b (patch)
tree7c42229b1cc64e67efe8ed21b82cdc513e638f82 /net/dccp/ackvec.c
parent110bae4efb5ed5565257a0fb9f6d26e6125a1c4b (diff)
[DCCP] options: Make dccp_insert_options & friends yell on error
And not the silly LIMIT_NETDEBUG and silently return without inserting the option requested. Also drop some old debugging messages associated to option insertion. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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: