From a9826d3a8cb2a69dd932b40830f5875f5038ee1b Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Mon, 20 Mar 2006 22:06:02 -0800 Subject: [PATCH] --- yaml --- r: 22234 b: refs/heads/master c: 6df9424a9ca35f9fab773d1a0a8919781a367125 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/dccp/options.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 499cf010f890..062d51081ccd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c0c736db7ef4a7bdc1a28f3de751cc7e9f720313 +refs/heads/master: 6df9424a9ca35f9fab773d1a0a8919781a367125 diff --git a/trunk/net/dccp/options.c b/trunk/net/dccp/options.c index 79d228e4d6b2..8867b6f43220 100644 --- a/trunk/net/dccp/options.c +++ b/trunk/net/dccp/options.c @@ -109,7 +109,8 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb) case DCCPO_MANDATORY: if (mandatory) goto out_invalid_option; - mandatory = 1; + if (pkt_type != DCCP_PKT_DATA) + mandatory = 1; break; case DCCPO_NDP_COUNT: if (len > 3) @@ -249,6 +250,10 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb) mandatory = 0; } + /* mandatory was the last byte in option list -> reset connection */ + if (mandatory) + goto out_invalid_option; + return 0; out_invalid_option: