diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index 47de172..1fe5091 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -303,14 +303,13 @@
 static inline void dccp_update_gsr(struct sock *sk, u64 seq)
 {
 	struct dccp_sock *dp = dccp_sk(sk);
+	const struct dccp_minisock *dmsk = dccp_msk(sk);
 
 	dp->dccps_gsr = seq;
 	dccp_set_seqno(&dp->dccps_swl,
-		       (dp->dccps_gsr + 1 -
-		        (dp->dccps_options.dccpo_sequence_window / 4)));
+		       dp->dccps_gsr + 1 - (dmsk->dccpms_sequence_window / 4));
 	dccp_set_seqno(&dp->dccps_swh,
-		       (dp->dccps_gsr +
-			(3 * dp->dccps_options.dccpo_sequence_window) / 4));
+		       dp->dccps_gsr + (3 * dmsk->dccpms_sequence_window) / 4);
 }
 
 static inline void dccp_update_gss(struct sock *sk, u64 seq)
@@ -320,7 +319,7 @@
 	dp->dccps_awh = dp->dccps_gss = seq;
 	dccp_set_seqno(&dp->dccps_awl,
 		       (dp->dccps_gss -
-			dp->dccps_options.dccpo_sequence_window + 1));
+			dccp_msk(sk)->dccpms_sequence_window + 1));
 }
 				
 static inline int dccp_ack_pending(const struct sock *sk)
@@ -328,7 +327,7 @@
 	const struct dccp_sock *dp = dccp_sk(sk);
 	return dp->dccps_timestamp_echo != 0 ||
 #ifdef CONFIG_IP_DCCP_ACKVEC
-	       (dp->dccps_options.dccpo_send_ack_vector &&
+	       (dccp_msk(sk)->dccpms_send_ack_vector &&
 		dccp_ackvec_pending(dp->dccps_hc_rx_ackvec)) ||
 #endif
 	       inet_csk_ack_scheduled(sk);
diff --git a/net/dccp/diag.c b/net/dccp/diag.c
index 3f78c00..0f25dc3 100644
--- a/net/dccp/diag.c
+++ b/net/dccp/diag.c
@@ -30,7 +30,7 @@
 	info->tcpi_backoff	= icsk->icsk_backoff;
 	info->tcpi_pmtu		= icsk->icsk_pmtu_cookie;
 
-	if (dp->dccps_options.dccpo_send_ack_vector)
+	if (dccp_msk(sk)->dccpms_send_ack_vector)
 		info->tcpi_options |= TCPI_OPT_SACK;
 
 	ccid_hc_rx_get_info(dp->dccps_hc_rx_ccid, sk, info);
diff --git a/net/dccp/feat.c b/net/dccp/feat.c
index ed0851f..b09064c 100644
--- a/net/dccp/feat.c
+++ b/net/dccp/feat.c
@@ -22,7 +22,7 @@
 int dccp_feat_change(struct sock *sk, u8 type, u8 feature, u8 *val, u8 len,
 		     gfp_t gfp)
 {
-	struct dccp_sock *dp = dccp_sk(sk);
+	struct dccp_minisock *dmsk = dccp_msk(sk);
 	struct dccp_opt_pend *opt;
 
 	dccp_pr_debug("feat change type=%d feat=%d\n", type, feature);
@@ -30,8 +30,7 @@
 	/* XXX sanity check feat change request */
 
 	/* check if that feature is already being negotiated */
-	list_for_each_entry(opt, &dp->dccps_options.dccpo_pending,
-			    dccpop_node) {
+	list_for_each_entry(opt, &dmsk->dccpms_pending, dccpop_node) {
 		/* ok we found a negotiation for this option already */
 		if (opt->dccpop_feat == feature && opt->dccpop_type == type) {
 			dccp_pr_debug("Replacing old\n");
@@ -59,7 +58,7 @@
 
 	BUG_ON(opt->dccpop_val == NULL);
 
-	list_add_tail(&opt->dccpop_node, &dp->dccps_options.dccpo_pending);
+	list_add_tail(&opt->dccpop_node, &dmsk->dccpms_pending);
 	return 0;
 }
 
@@ -68,10 +67,10 @@
 static int dccp_feat_update_ccid(struct sock *sk, u8 type, u8 new_ccid_nr)
 {
 	struct dccp_sock *dp = dccp_sk(sk);
+	struct dccp_minisock *dmsk = dccp_msk(sk);
 	/* figure out if we are changing our CCID or the peer's */
 	const int rx = type == DCCPO_CHANGE_R;
-	const u8 ccid_nr = rx ? dp->dccps_options.dccpo_rx_ccid :
-				dp->dccps_options.dccpo_tx_ccid;
+	const u8 ccid_nr = rx ? dmsk->dccpms_rx_ccid : dmsk->dccpms_tx_ccid;
 	struct ccid *new_ccid;
 
 	/* Check if nothing is being changed. */
@@ -85,11 +84,11 @@
 	if (rx) {
 		ccid_hc_rx_delete(dp->dccps_hc_rx_ccid, sk);
 		dp->dccps_hc_rx_ccid = new_ccid;
-		dp->dccps_options.dccpo_rx_ccid = new_ccid_nr;
+		dmsk->dccpms_rx_ccid = new_ccid_nr;
 	} else {
 		ccid_hc_tx_delete(dp->dccps_hc_tx_ccid, sk);
 		dp->dccps_hc_tx_ccid = new_ccid;
-		dp->dccps_options.dccpo_tx_ccid = new_ccid_nr;
+		dmsk->dccpms_tx_ccid = new_ccid_nr;
 	}
 
 	return 0;
@@ -159,9 +158,9 @@
 		case DCCPF_CCID:
 			/* XXX did i get this right? =P */
 			if (opt->dccpop_type == DCCPO_CHANGE_L)
-				res = &dp->dccps_options.dccpo_tx_ccid;
+				res = &dccp_msk(sk)->dccpms_tx_ccid;
 			else
-				res = &dp->dccps_options.dccpo_rx_ccid;
+				res = &dccp_msk(sk)->dccpms_rx_ccid;
 			break;
 
 		default:
@@ -226,7 +225,7 @@
 
 static int dccp_feat_sp(struct sock *sk, u8 type, u8 feature, u8 *val, u8 len)
 {
-	struct dccp_sock *dp = dccp_sk(sk);
+	struct dccp_minisock *dmsk = dccp_msk(sk);
 	struct dccp_opt_pend *opt;
 	int rc = 1;
 	u8 t;
@@ -242,8 +241,7 @@
 		t = DCCPO_CHANGE_L;
 
 	/* find our preference list for this feature */
-	list_for_each_entry(opt, &dp->dccps_options.dccpo_pending,
-			    dccpop_node) {
+	list_for_each_entry(opt, &dmsk->dccpms_pending, dccpop_node) {
 		if (opt->dccpop_type != t || opt->dccpop_feat != feature)
 			continue;
 
@@ -265,7 +263,7 @@
 static int dccp_feat_nn(struct sock *sk, u8 type, u8 feature, u8 *val, u8 len)
 {
 	struct dccp_opt_pend *opt;
-	struct dccp_sock *dp = dccp_sk(sk);
+	struct dccp_minisock *dmsk = dccp_msk(sk);
 	u8 *copy;
 	int rc;
 
@@ -304,14 +302,14 @@
 	}
 
 	dccp_pr_debug("Confirming NN feature %d (val=%d)\n", feature, *copy);
-	list_add_tail(&opt->dccpop_node, &dp->dccps_options.dccpo_conf);
+	list_add_tail(&opt->dccpop_node, &dmsk->dccpms_conf);
 
 	return 0;
 }
 
 static void dccp_feat_empty_confirm(struct sock *sk, u8 type, u8 feature)
 {
-	struct dccp_sock *dp = dccp_sk(sk);
+	struct dccp_minisock *dmsk = dccp_msk(sk);
 	/* XXX check if other confirms for that are queued and recycle slot */
 	struct dccp_opt_pend *opt = kzalloc(sizeof(*opt), GFP_ATOMIC);
 
@@ -330,20 +328,19 @@
 
 	/* change feature */
 	dccp_pr_debug("Empty confirm feature %d type %d\n", feature, type);
-	list_add_tail(&opt->dccpop_node, &dp->dccps_options.dccpo_conf);
+	list_add_tail(&opt->dccpop_node, &dmsk->dccpms_conf);
 }
 
 static void dccp_feat_flush_confirm(struct sock *sk)
 {
-	struct dccp_sock *dp = dccp_sk(sk);
+	struct dccp_minisock *dmsk = dccp_msk(sk);
 	/* Check if there is anything to confirm in the first place */
-	int yes = !list_empty(&dp->dccps_options.dccpo_conf);
+	int yes = !list_empty(&dmsk->dccpms_conf);
 
 	if (!yes) {
 		struct dccp_opt_pend *opt;
 
-		list_for_each_entry(opt, &dp->dccps_options.dccpo_pending,
-				    dccpop_node) {
+		list_for_each_entry(opt, &dmsk->dccpms_pending, dccpop_node) {
 			if (opt->dccpop_conf) {
 				yes = 1;
 				break;
@@ -407,7 +404,7 @@
 {
 	u8 t;
 	struct dccp_opt_pend *opt;
-	struct dccp_sock *dp = dccp_sk(sk);
+	struct dccp_minisock *dmsk = dccp_msk(sk);
 	int rc = 1;
 	int all_confirmed = 1;
 
@@ -418,8 +415,7 @@
 	/* locate our change request */
 	t = type == DCCPO_CONFIRM_L ? DCCPO_CHANGE_R : DCCPO_CHANGE_L;
 
-	list_for_each_entry(opt, &dp->dccps_options.dccpo_pending,
-			    dccpop_node) {
+	list_for_each_entry(opt, &dmsk->dccpms_pending, dccpop_node) {
 		if (!opt->dccpop_conf && opt->dccpop_type == t &&
 		    opt->dccpop_feat == feature) {
 			/* we found it */
@@ -462,10 +458,10 @@
 
 void dccp_feat_clean(struct sock *sk)
 {
-	struct dccp_sock *dp = dccp_sk(sk);
+	struct dccp_minisock *dmsk = dccp_msk(sk);
 	struct dccp_opt_pend *opt, *next;
 
-	list_for_each_entry_safe(opt, next, &dp->dccps_options.dccpo_pending,
+	list_for_each_entry_safe(opt, next, &dmsk->dccpms_pending,
 				 dccpop_node) {
                 BUG_ON(opt->dccpop_val == NULL);
                 kfree(opt->dccpop_val);
@@ -478,16 +474,15 @@
 
                 kfree(opt);
         }
-	INIT_LIST_HEAD(&dp->dccps_options.dccpo_pending);
+	INIT_LIST_HEAD(&dmsk->dccpms_pending);
 
-	list_for_each_entry_safe(opt, next, &dp->dccps_options.dccpo_conf,
-				 dccpop_node) {
+	list_for_each_entry_safe(opt, next, &dmsk->dccpms_conf, dccpop_node) {
 		BUG_ON(opt == NULL);
 		if (opt->dccpop_val != NULL)
 			kfree(opt->dccpop_val);
 		kfree(opt);
 	}
-	INIT_LIST_HEAD(&dp->dccps_options.dccpo_conf);
+	INIT_LIST_HEAD(&dmsk->dccpms_conf);
 }
 
 EXPORT_SYMBOL_GPL(dccp_feat_clean);
@@ -498,16 +493,15 @@
  */
 int dccp_feat_clone(struct sock *oldsk, struct sock *newsk)
 {
-	struct dccp_sock *olddp = dccp_sk(oldsk);
-	struct dccp_sock *newdp = dccp_sk(newsk);
+	struct dccp_minisock *olddmsk = dccp_msk(oldsk);
+	struct dccp_minisock *newdmsk = dccp_msk(newsk);
 	struct dccp_opt_pend *opt;
 	int rc = 0;
 
-	INIT_LIST_HEAD(&newdp->dccps_options.dccpo_pending);
-	INIT_LIST_HEAD(&newdp->dccps_options.dccpo_conf);
+	INIT_LIST_HEAD(&newdmsk->dccpms_pending);
+	INIT_LIST_HEAD(&newdmsk->dccpms_conf);
 
-	list_for_each_entry(opt, &olddp->dccps_options.dccpo_pending,
-			    dccpop_node) {
+	list_for_each_entry(opt, &olddmsk->dccpms_pending, dccpop_node) {
 		struct dccp_opt_pend *newopt;
 		/* copy the value of the option */
 		u8 *val = kmalloc(opt->dccpop_len, GFP_ATOMIC);
@@ -525,8 +519,7 @@
 		/* insert the option */
 		memcpy(newopt, opt, sizeof(*newopt));
 		newopt->dccpop_val = val;
-		list_add_tail(&newopt->dccpop_node,
-			      &newdp->dccps_options.dccpo_pending);
+		list_add_tail(&newopt->dccpop_node, &newdmsk->dccpms_pending);
 
 		/* XXX what happens with backlogs and multiple connections at
 		 * once...
@@ -567,27 +560,27 @@
 
 int dccp_feat_init(struct sock *sk)
 {
-	struct dccp_sock *dp = dccp_sk(sk);
+	struct dccp_minisock *dmsk = dccp_msk(sk);
 	int rc;
 
-	INIT_LIST_HEAD(&dp->dccps_options.dccpo_pending);
-	INIT_LIST_HEAD(&dp->dccps_options.dccpo_conf);
+	INIT_LIST_HEAD(&dmsk->dccpms_pending);
+	INIT_LIST_HEAD(&dmsk->dccpms_conf);
 
 	/* CCID L */
 	rc = __dccp_feat_init(sk, DCCPO_CHANGE_L, DCCPF_CCID,
-			      &dp->dccps_options.dccpo_tx_ccid, 1);
+			      &dmsk->dccpms_tx_ccid, 1);
 	if (rc)
 		goto out;
 
 	/* CCID R */
 	rc = __dccp_feat_init(sk, DCCPO_CHANGE_R, DCCPF_CCID,
-			      &dp->dccps_options.dccpo_rx_ccid, 1);
+			      &dmsk->dccpms_rx_ccid, 1);
 	if (rc)
 		goto out;
 
 	/* Ack ratio */
 	rc = __dccp_feat_init(sk, DCCPO_CHANGE_L, DCCPF_ACK_RATIO,
-			      &dp->dccps_options.dccpo_ack_ratio, 1);
+			      &dmsk->dccpms_ack_ratio, 1);
 out:
 	return rc;
 }
diff --git a/net/dccp/input.c b/net/dccp/input.c
index f53e3fc..bfc5366 100644
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -60,7 +60,7 @@
 {
 	struct dccp_sock *dp = dccp_sk(sk);
 
-	if (dp->dccps_options.dccpo_send_ack_vector)
+	if (dccp_msk(sk)->dccpms_send_ack_vector)
 		dccp_ackvec_check_rcv_ackno(dp->dccps_hc_rx_ackvec, sk,
 					    DCCP_SKB_CB(skb)->dccpd_ack_seq);
 }
@@ -246,7 +246,7 @@
 	if (DCCP_SKB_CB(skb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ)
 		dccp_event_ack_recv(sk, skb);
 
-	if (dp->dccps_options.dccpo_send_ack_vector &&
+	if (dccp_msk(sk)->dccpms_send_ack_vector &&
 	    dccp_ackvec_add(dp->dccps_hc_rx_ackvec, sk,
 			    DCCP_SKB_CB(skb)->dccpd_seq,
 			    DCCP_ACKVEC_STATE_RECEIVED))
@@ -302,7 +302,7 @@
 		if (dccp_parse_options(sk, skb))
 			goto out_invalid_packet;
 
-                if (dp->dccps_options.dccpo_send_ack_vector &&
+                if (dccp_msk(sk)->dccpms_send_ack_vector &&
                     dccp_ackvec_add(dp->dccps_hc_rx_ackvec, sk,
                                     DCCP_SKB_CB(skb)->dccpd_seq,
                                     DCCP_ACKVEC_STATE_RECEIVED))
@@ -486,7 +486,7 @@
 		if (dcb->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ)
 			dccp_event_ack_recv(sk, skb);
 
- 		if (dp->dccps_options.dccpo_send_ack_vector &&
+ 		if (dccp_msk(sk)->dccpms_send_ack_vector &&
 		    dccp_ackvec_add(dp->dccps_hc_rx_ackvec, sk,
  				    DCCP_SKB_CB(skb)->dccpd_seq,
  				    DCCP_ACKVEC_STATE_RECEIVED))
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c
index 5324fca..c0349e5 100644
--- a/net/dccp/minisocks.c
+++ b/net/dccp/minisocks.c
@@ -107,6 +107,7 @@
 		const struct dccp_request_sock *dreq = dccp_rsk(req);
 		struct inet_connection_sock *newicsk = inet_csk(sk);
 		struct dccp_sock *newdp = dccp_sk(newsk);
+		struct dccp_minisock *newdmsk = dccp_msk(newsk);
 
 		newdp->dccps_role	   = DCCP_ROLE_SERVER;
 		newdp->dccps_hc_rx_ackvec  = NULL;
@@ -118,7 +119,7 @@
 		if (dccp_feat_clone(sk, newsk))
 			goto out_free;
 
-		if (newdp->dccps_options.dccpo_send_ack_vector) {
+		if (newdmsk->dccpms_send_ack_vector) {
 			newdp->dccps_hc_rx_ackvec =
 						dccp_ackvec_alloc(GFP_ATOMIC);
 			if (unlikely(newdp->dccps_hc_rx_ackvec == NULL))
@@ -126,10 +127,10 @@
 		}
 
 		newdp->dccps_hc_rx_ccid =
-			    ccid_hc_rx_new(newdp->dccps_options.dccpo_rx_ccid,
+			    ccid_hc_rx_new(newdmsk->dccpms_rx_ccid,
 					   newsk, GFP_ATOMIC);
 		newdp->dccps_hc_tx_ccid =
-			    ccid_hc_tx_new(newdp->dccps_options.dccpo_tx_ccid,
+			    ccid_hc_tx_new(newdmsk->dccpms_tx_ccid,
 					   newsk, GFP_ATOMIC);
 		if (unlikely(newdp->dccps_hc_rx_ccid == NULL ||
 			     newdp->dccps_hc_tx_ccid == NULL)) {
@@ -153,7 +154,7 @@
 		 */
 
 		/* See dccp_v4_conn_request */
-		newdp->dccps_options.dccpo_sequence_window = req->rcv_wnd;
+		newdmsk->dccpms_sequence_window = req->rcv_wnd;
 
 		newdp->dccps_gar = newdp->dccps_isr = dreq->dreq_isr;
 		dccp_update_gsr(newsk, dreq->dreq_isr);
diff --git a/net/dccp/options.c b/net/dccp/options.c
index 6e85550..e9feb2a 100644
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -30,14 +30,14 @@
 int dccp_feat_default_send_ack_vector = DCCPF_INITIAL_SEND_ACK_VECTOR;
 int dccp_feat_default_send_ndp_count  = DCCPF_INITIAL_SEND_NDP_COUNT;
 
-void dccp_options_init(struct dccp_options *dccpo)
+void dccp_minisock_init(struct dccp_minisock *dmsk)
 {
-	dccpo->dccpo_sequence_window = dccp_feat_default_sequence_window;
-	dccpo->dccpo_rx_ccid	     = dccp_feat_default_rx_ccid;
-	dccpo->dccpo_tx_ccid	     = dccp_feat_default_tx_ccid;
-	dccpo->dccpo_ack_ratio	     = dccp_feat_default_ack_ratio;
-	dccpo->dccpo_send_ack_vector = dccp_feat_default_send_ack_vector;
-	dccpo->dccpo_send_ndp_count  = dccp_feat_default_send_ndp_count;
+	dmsk->dccpms_sequence_window = dccp_feat_default_sequence_window;
+	dmsk->dccpms_rx_ccid	     = dccp_feat_default_rx_ccid;
+	dmsk->dccpms_tx_ccid	     = dccp_feat_default_tx_ccid;
+	dmsk->dccpms_ack_ratio	     = dccp_feat_default_ack_ratio;
+	dmsk->dccpms_send_ack_vector = dccp_feat_default_send_ack_vector;
+	dmsk->dccpms_send_ndp_count  = dccp_feat_default_send_ndp_count;
 }
 
 static u32 dccp_decode_value_var(const unsigned char *bf, const u8 len)
@@ -151,7 +151,7 @@
 			if (pkt_type == DCCP_PKT_DATA)
 				break;
 
-			if (dp->dccps_options.dccpo_send_ack_vector &&
+			if (dccp_msk(sk)->dccpms_send_ack_vector &&
 			    dccp_ackvec_parse(sk, skb, opt, value, len))
 				goto out_invalid_option;
 			break;
@@ -472,12 +472,12 @@
 static int dccp_insert_options_feat(struct sock *sk, struct sk_buff *skb)
 {
 	struct dccp_sock *dp = dccp_sk(sk);
+	struct dccp_minisock *dmsk = dccp_msk(sk);
 	struct dccp_opt_pend *opt, *next;
 	int change = 0;
 
 	/* confirm any options [NN opts] */
-	list_for_each_entry_safe(opt, next, &dp->dccps_options.dccpo_conf,
-				 dccpop_node) {
+	list_for_each_entry_safe(opt, next, &dmsk->dccpms_conf, dccpop_node) {
 		dccp_insert_feat_opt(skb, opt->dccpop_type,
 				     opt->dccpop_feat, opt->dccpop_val,
 				     opt->dccpop_len);
@@ -486,11 +486,10 @@
 			kfree(opt->dccpop_val);
 		kfree(opt);
 	}
-	INIT_LIST_HEAD(&dp->dccps_options.dccpo_conf);
+	INIT_LIST_HEAD(&dmsk->dccpms_conf);
 
 	/* see which features we need to send */
-	list_for_each_entry(opt, &dp->dccps_options.dccpo_pending,
-			    dccpop_node) {
+	list_for_each_entry(opt, &dmsk->dccpms_pending, dccpop_node) {
 		/* see if we need to send any confirm */
 		if (opt->dccpop_sc) {
 			dccp_insert_feat_opt(skb, opt->dccpop_type + 1,
@@ -536,15 +535,16 @@
 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 (dp->dccps_options.dccpo_send_ndp_count &&
+	if (dmsk->dccpms_send_ndp_count &&
 	    dccp_insert_option_ndp(sk, skb))
 		return -1;
 
 	if (!dccp_packet_without_ack(skb)) {
-		if (dp->dccps_options.dccpo_send_ack_vector &&
+		if (dmsk->dccpms_send_ack_vector &&
 		    dccp_ackvec_pending(dp->dccps_hc_rx_ackvec) &&
 		    dccp_insert_option_ackvec(sk, skb))
 			return -1;
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 8a6d0a8..ede9690 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -166,9 +166,10 @@
 int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized)
 {
 	struct dccp_sock *dp = dccp_sk(sk);
+	struct dccp_minisock *dmsk = dccp_msk(sk);
 	struct inet_connection_sock *icsk = inet_csk(sk);
 
-	dccp_options_init(&dp->dccps_options);
+	dccp_minisock_init(&dp->dccps_minisock);
 	do_gettimeofday(&dp->dccps_epoch);
 
 	/*
@@ -184,22 +185,20 @@
 		if (rc)
 			return rc;
 
-		if (dp->dccps_options.dccpo_send_ack_vector) {
+		if (dmsk->dccpms_send_ack_vector) {
 			dp->dccps_hc_rx_ackvec = dccp_ackvec_alloc(GFP_KERNEL);
 			if (dp->dccps_hc_rx_ackvec == NULL)
 				return -ENOMEM;
 		}
-		dp->dccps_hc_rx_ccid =
-				ccid_hc_rx_new(dp->dccps_options.dccpo_rx_ccid,
-					       sk, GFP_KERNEL);
-		dp->dccps_hc_tx_ccid =
-				ccid_hc_tx_new(dp->dccps_options.dccpo_tx_ccid,
-					       sk, GFP_KERNEL);
+		dp->dccps_hc_rx_ccid = ccid_hc_rx_new(dmsk->dccpms_rx_ccid,
+						      sk, GFP_KERNEL);
+		dp->dccps_hc_tx_ccid = ccid_hc_tx_new(dmsk->dccpms_tx_ccid,
+						      sk, GFP_KERNEL);
 	    	if (unlikely(dp->dccps_hc_rx_ccid == NULL ||
 			     dp->dccps_hc_tx_ccid == NULL)) {
 			ccid_hc_rx_delete(dp->dccps_hc_rx_ccid, sk);
 			ccid_hc_tx_delete(dp->dccps_hc_tx_ccid, sk);
-			if (dp->dccps_options.dccpo_send_ack_vector) {
+			if (dmsk->dccpms_send_ack_vector) {
 				dccp_ackvec_free(dp->dccps_hc_rx_ackvec);
 				dp->dccps_hc_rx_ackvec = NULL;
 			}
@@ -208,8 +207,8 @@
 		}
 	} else {
 		/* control socket doesn't need feat nego */
-		INIT_LIST_HEAD(&dp->dccps_options.dccpo_pending);
-		INIT_LIST_HEAD(&dp->dccps_options.dccpo_conf);
+		INIT_LIST_HEAD(&dmsk->dccpms_pending);
+		INIT_LIST_HEAD(&dmsk->dccpms_conf);
 	}
 
 	dccp_init_xmit_timers(sk);
@@ -247,7 +246,7 @@
 	kfree(dp->dccps_service_list);
 	dp->dccps_service_list = NULL;
 
-	if (dp->dccps_options.dccpo_send_ack_vector) {
+	if (dccp_msk(sk)->dccpms_send_ack_vector) {
 		dccp_ackvec_free(dp->dccps_hc_rx_ackvec);
 		dp->dccps_hc_rx_ackvec = NULL;
 	}
