summaryrefslogtreecommitdiffstats
path: root/net/dccp/output.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/output.c
parent110bae4efb5ed5565257a0fb9f6d26e6125a1c4b (diff)
downloadop-kernel-dev-2d0817d11eaec57435feb61493331a763f732a2b.zip
op-kernel-dev-2d0817d11eaec57435feb61493331a763f732a2b.tar.gz
[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.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/net/dccp/output.c b/net/dccp/output.c
index 2975e3d..7409e4a 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)
}
dcb->dccpd_seq = dp->dccps_gss;
- dccp_insert_options(sk, skb);
+
+ if (dccp_insert_options(sk, skb)) {
+ kfree_skb(skb);
+ return -EPROTO;
+ }
skb->h.raw = skb_push(skb, dccp_header_size);
dh = dccp_hdr(skb);
@@ -296,7 +300,11 @@ struct sk_buff *dccp_make_response(struct sock *sk, struct dst_entry *dst,
dreq = dccp_rsk(req);
DCCP_SKB_CB(skb)->dccpd_type = DCCP_PKT_RESPONSE;
DCCP_SKB_CB(skb)->dccpd_seq = dreq->dreq_iss;
- dccp_insert_options(sk, skb);
+
+ if (dccp_insert_options(sk, skb)) {
+ kfree_skb(skb);
+ return NULL;
+ }
skb->h.raw = skb_push(skb, dccp_header_size);
@@ -344,7 +352,11 @@ static struct sk_buff *dccp_make_reset(struct sock *sk, struct dst_entry *dst,
DCCP_SKB_CB(skb)->dccpd_reset_code = code;
DCCP_SKB_CB(skb)->dccpd_type = DCCP_PKT_RESET;
DCCP_SKB_CB(skb)->dccpd_seq = dp->dccps_gss;
- dccp_insert_options(sk, skb);
+
+ if (dccp_insert_options(sk, skb)) {
+ kfree_skb(skb);
+ return NULL;
+ }
skb->h.raw = skb_push(skb, dccp_header_size);
OpenPOWER on IntegriCloud