summaryrefslogtreecommitdiffstats
path: root/net/dccp/ackvec.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2006-03-20 22:32:06 -0800
committerDavid S. Miller <davem@davemloft.net>2006-03-20 22:32:06 -0800
commit2d0817d11eaec57435feb61493331a763f732a2b (patch)
tree7c42229b1cc64e67efe8ed21b82cdc513e638f82 /net/dccp/ackvec.c
parent110bae4efb5ed5565257a0fb9f6d26e6125a1c4b (diff)
downloadlinux-2d0817d11eaec57435feb61493331a763f732a2b.tar.bz2
[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)
if (DCCP_SKB_CB(skb)->dccpd_opt_len + len > DCCP_MAX_OPT_LEN)
return -1;
- avr = dccp_ackvec_record_new();
- if (avr == NULL)
- return -1;
-
dccp_timestamp(sk, &now);
elapsed_time = timeval_delta(&now, &av->dccpav_time) / 10;
- if (elapsed_time != 0)
- dccp_insert_option_elapsed_time(sk, skb, elapsed_time);
+ if (elapsed_time != 0 &&
+ dccp_insert_option_elapsed_time(sk, skb, elapsed_time))
+ return -1;
+
+ avr = dccp_ackvec_record_new();
+ if (avr == NULL)
+ return -1;
DCCP_SKB_CB(skb)->dccpd_opt_len += len;
@@ -310,7 +311,6 @@ int dccp_ackvec_add(struct dccp_ackvec *av, const struct sock *sk,
av->dccpav_buf_ackno = ackno;
dccp_timestamp(sk, &av->dccpav_time);
out:
- dccp_pr_debug("");
return 0;
out_duplicate: