Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78188
b: refs/heads/master
c: c86ab2b
h: refs/heads/master
v: v3
  • Loading branch information
Gerrit Renker authored and David S. Miller committed Jan 28, 2008
1 parent ede1d01 commit 15c5268
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 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: 6d57b43bf810cd66ccf252c04ba65c3e8e56cbb1
refs/heads/master: c86ab2b6a5deec2223a606b90c001bedda9d950b
13 changes: 6 additions & 7 deletions trunk/net/dccp/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
break;
case DCCPO_ACK_VECTOR_0:
case DCCPO_ACK_VECTOR_1:
if (pkt_type == DCCP_PKT_DATA)
if (dccp_packet_without_ack(skb)) /* RFC 4340, 11.4 */
break;

if (dccp_msk(sk)->dccpms_send_ack_vector &&
Expand Down Expand Up @@ -194,18 +194,17 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
opt_recv->dccpor_elapsed_time = elapsed_time;
break;
case DCCPO_ELAPSED_TIME:
if (len != 2 && len != 4)
goto out_invalid_option;

if (pkt_type == DCCP_PKT_DATA)
continue;
if (dccp_packet_without_ack(skb)) /* RFC 4340, 13.2 */
break;

if (len == 2) {
__be16 opt_val2 = get_unaligned((__be16 *)value);
elapsed_time = ntohs(opt_val2);
} else {
} else if (len == 4) {
opt_val = get_unaligned((__be32 *)value);
elapsed_time = ntohl(opt_val);
} else {
goto out_invalid_option;
}

if (elapsed_time > opt_recv->dccpor_elapsed_time)
Expand Down

0 comments on commit 15c5268

Please sign in to comment.