Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[safe/jmp/linux-2.6] / net / dccp / options.c
index 2c444c1..1b08cae 100644 (file)
 #include "dccp.h"
 #include "feat.h"
 
-int sysctl_dccp_feat_sequence_window = DCCPF_INITIAL_SEQUENCE_WINDOW;
-int sysctl_dccp_feat_rx_ccid         = DCCPF_INITIAL_CCID;
-int sysctl_dccp_feat_tx_ccid         = DCCPF_INITIAL_CCID;
-int sysctl_dccp_feat_send_ack_vector = DCCPF_INITIAL_SEND_ACK_VECTOR;
-int sysctl_dccp_feat_send_ndp_count  = DCCPF_INITIAL_SEND_NDP_COUNT;
-
 u64 dccp_decode_value_var(const u8 *bf, const u8 len)
 {
        u64 value = 0;
@@ -134,32 +128,19 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
                        dccp_pr_debug("%s opt: NDP count=%llu\n", dccp_role(sk),
                                      (unsigned long long)opt_recv->dccpor_ndp);
                        break;
-               case DCCPO_CHANGE_L:
-               case DCCPO_CHANGE_R:
-                       if (pkt_type == DCCP_PKT_DATA)
+               case DCCPO_CHANGE_L ... DCCPO_CONFIRM_R:
+                       if (pkt_type == DCCP_PKT_DATA)      /* RFC 4340, 6 */
                                break;
                        rc = dccp_feat_parse_options(sk, dreq, mandatory, opt,
                                                    *value, value + 1, len - 1);
                        if (rc)
                                goto out_featneg_failed;
                        break;
-               case DCCPO_CONFIRM_L:
-                       /* fall through */
-               case DCCPO_CONFIRM_R:
-                       if (pkt_type == DCCP_PKT_DATA)
-                               break;
-                       if (len < 2)    /* FIXME this disallows empty confirm */
-                               goto out_invalid_option;
-                       if (dccp_feat_confirm_recv(sk, opt, *value,
-                                                  value + 1, len - 1))
-                               goto out_invalid_option;
-                       break;
                case DCCPO_ACK_VECTOR_0:
                case DCCPO_ACK_VECTOR_1:
                        if (dccp_packet_without_ack(skb))   /* RFC 4340, 11.4 */
                                break;
-
-                       if (dccp_msk(sk)->dccpms_send_ack_vector &&
+                       if (dp->dccps_hc_rx_ackvec != NULL &&
                            dccp_ackvec_parse(sk, skb, &ackno, opt, value, len))
                                goto out_invalid_option;
                        break;
@@ -517,10 +498,6 @@ int dccp_insert_fn_opt(struct sk_buff *skb, u8 type, u8 feat,
                *to++ = *val;
        if (len)
                memcpy(to, val, len);
-
-       dccp_pr_debug("%s(%s (%d), ...), length %d\n",
-                     dccp_feat_typename(type),
-                     dccp_feat_name(feat), feat, len);
        return 0;
 }
 
@@ -539,12 +516,10 @@ static void dccp_insert_option_padding(struct sk_buff *skb)
 int dccp_insert_options(struct sock *sk, struct sk_buff *skb)
 {
        struct dccp_sock *dp = dccp_sk(sk);
-       struct dccp_minisock *dmsk = dccp_msk(sk);
 
        DCCP_SKB_CB(skb)->dccpd_opt_len = 0;
 
-       if (dmsk->dccpms_send_ndp_count &&
-           dccp_insert_option_ndp(sk, skb))
+       if (dp->dccps_send_ndp_count && dccp_insert_option_ndp(sk, skb))
                return -1;
 
        if (DCCP_SKB_CB(skb)->dccpd_type != DCCP_PKT_DATA) {
@@ -561,7 +536,7 @@ int dccp_insert_options(struct sock *sk, struct sk_buff *skb)
                        if (dccp_insert_option_timestamp(sk, skb))
                                return -1;
 
-               } else if (dmsk->dccpms_send_ack_vector &&
+               } else if (dp->dccps_hc_rx_ackvec != NULL &&
                           dccp_ackvec_pending(dp->dccps_hc_rx_ackvec) &&
                           dccp_insert_option_ackvec(sk, skb)) {
                                return -1;