aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/options.c')
-rw-r--r--net/dccp/options.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/net/dccp/options.c b/net/dccp/options.c
index 6e85550cc6f0..e9feb2a0c770 100644
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -30,14 +30,14 @@ int dccp_feat_default_ack_ratio = DCCPF_INITIAL_ACK_RATIO;
30int dccp_feat_default_send_ack_vector = DCCPF_INITIAL_SEND_ACK_VECTOR; 30int dccp_feat_default_send_ack_vector = DCCPF_INITIAL_SEND_ACK_VECTOR;
31int dccp_feat_default_send_ndp_count = DCCPF_INITIAL_SEND_NDP_COUNT; 31int dccp_feat_default_send_ndp_count = DCCPF_INITIAL_SEND_NDP_COUNT;
32 32
33void dccp_options_init(struct dccp_options *dccpo) 33void dccp_minisock_init(struct dccp_minisock *dmsk)
34{ 34{
35 dccpo->dccpo_sequence_window = dccp_feat_default_sequence_window; 35 dmsk->dccpms_sequence_window = dccp_feat_default_sequence_window;
36 dccpo->dccpo_rx_ccid = dccp_feat_default_rx_ccid; 36 dmsk->dccpms_rx_ccid = dccp_feat_default_rx_ccid;
37 dccpo->dccpo_tx_ccid = dccp_feat_default_tx_ccid; 37 dmsk->dccpms_tx_ccid = dccp_feat_default_tx_ccid;
38 dccpo->dccpo_ack_ratio = dccp_feat_default_ack_ratio; 38 dmsk->dccpms_ack_ratio = dccp_feat_default_ack_ratio;
39 dccpo->dccpo_send_ack_vector = dccp_feat_default_send_ack_vector; 39 dmsk->dccpms_send_ack_vector = dccp_feat_default_send_ack_vector;
40 dccpo->dccpo_send_ndp_count = dccp_feat_default_send_ndp_count; 40 dmsk->dccpms_send_ndp_count = dccp_feat_default_send_ndp_count;
41} 41}
42 42
43static u32 dccp_decode_value_var(const unsigned char *bf, const u8 len) 43static u32 dccp_decode_value_var(const unsigned char *bf, const u8 len)
@@ -151,7 +151,7 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
151 if (pkt_type == DCCP_PKT_DATA) 151 if (pkt_type == DCCP_PKT_DATA)
152 break; 152 break;
153 153
154 if (dp->dccps_options.dccpo_send_ack_vector && 154 if (dccp_msk(sk)->dccpms_send_ack_vector &&
155 dccp_ackvec_parse(sk, skb, opt, value, len)) 155 dccp_ackvec_parse(sk, skb, opt, value, len))
156 goto out_invalid_option; 156 goto out_invalid_option;
157 break; 157 break;
@@ -472,12 +472,12 @@ static int dccp_insert_feat_opt(struct sk_buff *skb, u8 type, u8 feat,
472static int dccp_insert_options_feat(struct sock *sk, struct sk_buff *skb) 472static int dccp_insert_options_feat(struct sock *sk, struct sk_buff *skb)
473{ 473{
474 struct dccp_sock *dp = dccp_sk(sk); 474 struct dccp_sock *dp = dccp_sk(sk);
475 struct dccp_minisock *dmsk = dccp_msk(sk);
475 struct dccp_opt_pend *opt, *next; 476 struct dccp_opt_pend *opt, *next;
476 int change = 0; 477 int change = 0;
477 478
478 /* confirm any options [NN opts] */ 479 /* confirm any options [NN opts] */
479 list_for_each_entry_safe(opt, next, &dp->dccps_options.dccpo_conf, 480 list_for_each_entry_safe(opt, next, &dmsk->dccpms_conf, dccpop_node) {
480 dccpop_node) {
481 dccp_insert_feat_opt(skb, opt->dccpop_type, 481 dccp_insert_feat_opt(skb, opt->dccpop_type,
482 opt->dccpop_feat, opt->dccpop_val, 482 opt->dccpop_feat, opt->dccpop_val,
483 opt->dccpop_len); 483 opt->dccpop_len);
@@ -486,11 +486,10 @@ static int dccp_insert_options_feat(struct sock *sk, struct sk_buff *skb)
486 kfree(opt->dccpop_val); 486 kfree(opt->dccpop_val);
487 kfree(opt); 487 kfree(opt);
488 } 488 }
489 INIT_LIST_HEAD(&dp->dccps_options.dccpo_conf); 489 INIT_LIST_HEAD(&dmsk->dccpms_conf);
490 490
491 /* see which features we need to send */ 491 /* see which features we need to send */
492 list_for_each_entry(opt, &dp->dccps_options.dccpo_pending, 492 list_for_each_entry(opt, &dmsk->dccpms_pending, dccpop_node) {
493 dccpop_node) {
494 /* see if we need to send any confirm */ 493 /* see if we need to send any confirm */
495 if (opt->dccpop_sc) { 494 if (opt->dccpop_sc) {
496 dccp_insert_feat_opt(skb, opt->dccpop_type + 1, 495 dccp_insert_feat_opt(skb, opt->dccpop_type + 1,
@@ -536,15 +535,16 @@ static int dccp_insert_options_feat(struct sock *sk, struct sk_buff *skb)
536int dccp_insert_options(struct sock *sk, struct sk_buff *skb) 535int dccp_insert_options(struct sock *sk, struct sk_buff *skb)
537{ 536{
538 struct dccp_sock *dp = dccp_sk(sk); 537 struct dccp_sock *dp = dccp_sk(sk);
538 struct dccp_minisock *dmsk = dccp_msk(sk);
539 539
540 DCCP_SKB_CB(skb)->dccpd_opt_len = 0; 540 DCCP_SKB_CB(skb)->dccpd_opt_len = 0;
541 541
542 if (dp->dccps_options.dccpo_send_ndp_count && 542 if (dmsk->dccpms_send_ndp_count &&
543 dccp_insert_option_ndp(sk, skb)) 543 dccp_insert_option_ndp(sk, skb))
544 return -1; 544 return -1;
545 545
546 if (!dccp_packet_without_ack(skb)) { 546 if (!dccp_packet_without_ack(skb)) {
547 if (dp->dccps_options.dccpo_send_ack_vector && 547 if (dmsk->dccpms_send_ack_vector &&
548 dccp_ackvec_pending(dp->dccps_hc_rx_ackvec) && 548 dccp_ackvec_pending(dp->dccps_hc_rx_ackvec) &&
549 dccp_insert_option_ackvec(sk, skb)) 549 dccp_insert_option_ackvec(sk, skb))
550 return -1; 550 return -1;