diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2006-03-21 01:32:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-21 01:32:06 -0500 |
commit | 2d0817d11eaec57435feb61493331a763f732a2b (patch) | |
tree | 7c42229b1cc64e67efe8ed21b82cdc513e638f82 /net/dccp/output.c | |
parent | 110bae4efb5ed5565257a0fb9f6d26e6125a1c4b (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/output.c')
-rw-r--r-- | net/dccp/output.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/net/dccp/output.c b/net/dccp/output.c index 2975e3d7a48c..7409e4a3abdf 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c | |||
@@ -83,7 +83,11 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb) | |||
83 | } | 83 | } |
84 | 84 | ||
85 | dcb->dccpd_seq = dp->dccps_gss; | 85 | dcb->dccpd_seq = dp->dccps_gss; |
86 | dccp_insert_options(sk, skb); | 86 | |
87 | if (dccp_insert_options(sk, skb)) { | ||
88 | kfree_skb(skb); | ||
89 | return -EPROTO; | ||
90 | } | ||
87 | 91 | ||
88 | skb->h.raw = skb_push(skb, dccp_header_size); | 92 | skb->h.raw = skb_push(skb, dccp_header_size); |
89 | dh = dccp_hdr(skb); | 93 | dh = dccp_hdr(skb); |
@@ -296,7 +300,11 @@ struct sk_buff *dccp_make_response(struct sock *sk, struct dst_entry *dst, | |||
296 | dreq = dccp_rsk(req); | 300 | dreq = dccp_rsk(req); |
297 | DCCP_SKB_CB(skb)->dccpd_type = DCCP_PKT_RESPONSE; | 301 | DCCP_SKB_CB(skb)->dccpd_type = DCCP_PKT_RESPONSE; |
298 | DCCP_SKB_CB(skb)->dccpd_seq = dreq->dreq_iss; | 302 | DCCP_SKB_CB(skb)->dccpd_seq = dreq->dreq_iss; |
299 | dccp_insert_options(sk, skb); | 303 | |
304 | if (dccp_insert_options(sk, skb)) { | ||
305 | kfree_skb(skb); | ||
306 | return NULL; | ||
307 | } | ||
300 | 308 | ||
301 | skb->h.raw = skb_push(skb, dccp_header_size); | 309 | skb->h.raw = skb_push(skb, dccp_header_size); |
302 | 310 | ||
@@ -344,7 +352,11 @@ static struct sk_buff *dccp_make_reset(struct sock *sk, struct dst_entry *dst, | |||
344 | DCCP_SKB_CB(skb)->dccpd_reset_code = code; | 352 | DCCP_SKB_CB(skb)->dccpd_reset_code = code; |
345 | DCCP_SKB_CB(skb)->dccpd_type = DCCP_PKT_RESET; | 353 | DCCP_SKB_CB(skb)->dccpd_type = DCCP_PKT_RESET; |
346 | DCCP_SKB_CB(skb)->dccpd_seq = dp->dccps_gss; | 354 | DCCP_SKB_CB(skb)->dccpd_seq = dp->dccps_gss; |
347 | dccp_insert_options(sk, skb); | 355 | |
356 | if (dccp_insert_options(sk, skb)) { | ||
357 | kfree_skb(skb); | ||
358 | return NULL; | ||
359 | } | ||
348 | 360 | ||
349 | skb->h.raw = skb_push(skb, dccp_header_size); | 361 | skb->h.raw = skb_push(skb, dccp_header_size); |
350 | 362 | ||