Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111447
b: refs/heads/master
c: faf61c3
h: refs/heads/master
i:
  111445: 9774405
  111443: f7f9ffb
  111439: f0a6775
v: v3
  • Loading branch information
Gerrit Renker committed Sep 4, 2008
1 parent dc8cfa8 commit df9ec63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: ba1a6c7bc0ff33e405f5156dc8f4145437255f1f
refs/heads/master: faf61c3319ea336ed47acd6ca86faaaa3a8f4937
10 changes: 6 additions & 4 deletions trunk/net/dccp/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
/* Check if this isn't a single byte option */
if (opt > DCCPO_MAX_RESERVED) {
if (opt_ptr == opt_end)
goto out_invalid_option;
goto out_nonsensical_length;

len = *opt_ptr++;
if (len < 3)
goto out_invalid_option;
if (len < 2)
goto out_nonsensical_length;
/*
* Remove the type and len fields, leaving
* just the value size
Expand All @@ -95,7 +95,7 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
opt_ptr += len;

if (opt_ptr > opt_end)
goto out_invalid_option;
goto out_nonsensical_length;
}

/*
Expand Down Expand Up @@ -283,6 +283,8 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
if (mandatory)
goto out_invalid_option;

out_nonsensical_length:
/* RFC 4340, 5.8: ignore option and all remaining option space */
return 0;

out_invalid_option:
Expand Down

0 comments on commit df9ec63

Please sign in to comment.