Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122402
b: refs/heads/master
c: 8b7b6c7
h: refs/heads/master
v: v3
  • Loading branch information
Gerrit Renker authored and David S. Miller committed Dec 2, 2008
1 parent f72913e commit 8d69d6a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 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: 0971d17ca3d80f61863f4750091a64448bf91600
refs/heads/master: 8b7b6c75c6387527b195bb69100182288da94f84
33 changes: 21 additions & 12 deletions trunk/net/dccp/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,11 +554,25 @@ int dccp_insert_options(struct sock *sk, struct sk_buff *skb)
dccp_insert_option_ndp(sk, skb))
return -1;

if (!dccp_packet_without_ack(skb)) {
if (dmsk->dccpms_send_ack_vector &&
dccp_ackvec_pending(dp->dccps_hc_rx_ackvec) &&
dccp_insert_option_ackvec(sk, skb))
if (DCCP_SKB_CB(skb)->dccpd_type != DCCP_PKT_DATA) {

/* Feature Negotiation */
if (dccp_feat_insert_opts(dp, NULL, skb))
return -1;

if (DCCP_SKB_CB(skb)->dccpd_type == DCCP_PKT_REQUEST) {
/*
* Obtain RTT sample from Request/Response exchange.
* This is currently used in CCID 3 initialisation.
*/
if (dccp_insert_option_timestamp(sk, skb))
return -1;

} else if (dmsk->dccpms_send_ack_vector &&
dccp_ackvec_pending(dp->dccps_hc_rx_ackvec) &&
dccp_insert_option_ackvec(sk, skb)) {
return -1;
}
}

if (dp->dccps_hc_rx_insert_options) {
Expand All @@ -567,14 +581,6 @@ int dccp_insert_options(struct sock *sk, struct sk_buff *skb)
dp->dccps_hc_rx_insert_options = 0;
}

/*
* Obtain RTT sample from Request/Response exchange.
* This is currently used in CCID 3 initialisation.
*/
if (DCCP_SKB_CB(skb)->dccpd_type == DCCP_PKT_REQUEST &&
dccp_insert_option_timestamp(sk, skb))
return -1;

if (dp->dccps_timestamp_echo != 0 &&
dccp_insert_option_timestamp_echo(dp, NULL, skb))
return -1;
Expand All @@ -587,6 +593,9 @@ int dccp_insert_options_rsk(struct dccp_request_sock *dreq, struct sk_buff *skb)
{
DCCP_SKB_CB(skb)->dccpd_opt_len = 0;

if (dccp_feat_insert_opts(NULL, dreq, skb))
return -1;

if (dreq->dreq_timestamp_echo != 0 &&
dccp_insert_option_timestamp_echo(NULL, dreq, skb))
return -1;
Expand Down

0 comments on commit 8d69d6a

Please sign in to comment.