Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8277
b: refs/heads/master
c: 507d37c
h: refs/heads/master
i:
  8275: d6d1e3a
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Sep 9, 2005
1 parent 922021d commit 3081042
Show file tree
Hide file tree
Showing 4 changed files with 15 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: 0ba7a3ba6608de6e0c0bfe3009a63d7e0b7ab0ce
refs/heads/master: 507d37cf269ebbd1b32bcc435fe577e411f73151
2 changes: 2 additions & 0 deletions trunk/include/linux/dccp.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,8 @@ struct dccp_sock {
struct ccid *dccps_hc_tx_ccid;
struct dccp_options_received dccps_options_received;
enum dccp_role dccps_role:2;
__u8 dccps_hc_rx_insert_options:1;
__u8 dccps_hc_tx_insert_options:1;
};

static inline struct dccp_sock *dccp_sk(const struct sock *sk)
Expand Down
5 changes: 4 additions & 1 deletion trunk/net/dccp/ccids/ccid3.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,12 @@ static int ccid3_hc_tx_send_packet(struct sock *sk,
}

/* Can we send? if so add options and add to packet history */
if (rc == 0)
if (rc == 0) {
dp->dccps_hc_tx_insert_options = 1;
new_packet->dccphtx_ccval =
DCCP_SKB_CB(skb)->dccpd_ccval =
hctx->ccid3hctx_last_win_count;
}
out:
return rc;
}
Expand Down Expand Up @@ -811,6 +813,7 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk)
hcrx->ccid3hcrx_pinv = ~0;
else
hcrx->ccid3hcrx_pinv = 1000000 / hcrx->ccid3hcrx_p;
dp->dccps_hc_rx_insert_options = 1;
dccp_send_ack(sk);
}

Expand Down
11 changes: 8 additions & 3 deletions trunk/net/dccp/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,13 +505,18 @@ void dccp_insert_options(struct sock *sk, struct sk_buff *skb)
(dp->dccps_hc_rx_ackpkts->dccpap_buf_ackno !=
DCCP_MAX_SEQNO + 1))
dccp_insert_option_ack_vector(sk, skb);

if (dp->dccps_timestamp_echo != 0)
dccp_insert_option_timestamp_echo(sk, skb);
}

ccid_hc_rx_insert_options(dp->dccps_hc_rx_ccid, sk, skb);
ccid_hc_tx_insert_options(dp->dccps_hc_tx_ccid, sk, skb);
if (dp->dccps_hc_rx_insert_options) {
ccid_hc_rx_insert_options(dp->dccps_hc_rx_ccid, sk, skb);
dp->dccps_hc_rx_insert_options = 0;
}
if (dp->dccps_hc_tx_insert_options) {
ccid_hc_tx_insert_options(dp->dccps_hc_tx_ccid, sk, skb);
dp->dccps_hc_tx_insert_options = 0;
}

/* XXX: insert other options when appropriate */

Expand Down

0 comments on commit 3081042

Please sign in to comment.