diff options
-rw-r--r-- | net/dccp/options.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/dccp/options.c b/net/dccp/options.c index 79d228e..8867b6f 100644 --- a/net/dccp/options.c +++ b/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: |