Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22234
b: refs/heads/master
c: 6df9424
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo authored and David S. Miller committed Mar 21, 2006
1 parent 6f4f2a2 commit a9826d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c0c736db7ef4a7bdc1a28f3de751cc7e9f720313
refs/heads/master: 6df9424a9ca35f9fab773d1a0a8919781a367125
7 changes: 6 additions & 1 deletion trunk/net/dccp/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit a9826d3

Please sign in to comment.