[DCCP]: Don't use necessarily the same CCID for tx and rx
authorArnaldo Carvalho de Melo <acme@mandriva.com>
Sun, 18 Sep 2005 07:18:52 +0000 (00:18 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 18 Sep 2005 07:18:52 +0000 (00:18 -0700)
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/dccp.h
net/dccp/ipv4.c
net/dccp/options.c

index 8c8e029095a5e9974a26ae9250539746de509697..13f9b78483fc3ded5464719f3f089b1e39205ebd 100644 (file)
@@ -330,7 +330,8 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb)
   */
 struct dccp_options {
        __u64   dccpo_sequence_window;
-       __u8    dccpo_ccid;
+       __u8    dccpo_rx_ccid;
+       __u8    dccpo_tx_ccid;
        __u8    dccpo_send_ack_vector;
        __u8    dccpo_send_ndp_count;
 };
index 82434e4a42df1d8a031e0c98675f2d7e51089efe..40fe6afacde61b17559f582315c53110fb544fc4 100644 (file)
@@ -1241,9 +1241,9 @@ static int dccp_v4_init_sock(struct sock *sk)
         * setsockopt(CCIDs-I-want/accept). -acme
         */
        if (likely(!dccp_ctl_socket_init)) {
-               dp->dccps_hc_rx_ccid = ccid_init(dp->dccps_options.dccpo_ccid,
+               dp->dccps_hc_rx_ccid = ccid_init(dp->dccps_options.dccpo_rx_ccid,
                                                 sk);
-               dp->dccps_hc_tx_ccid = ccid_init(dp->dccps_options.dccpo_ccid,
+               dp->dccps_hc_tx_ccid = ccid_init(dp->dccps_options.dccpo_tx_ccid,
                                                 sk);
                if (dp->dccps_hc_rx_ccid == NULL ||
                    dp->dccps_hc_tx_ccid == NULL) {
index c480c506a4a47c7708cea4ed2ce877fbc62ece88..0a76426c9aeab322f6eae5dd8e8e2309e1454d98 100644 (file)
@@ -25,7 +25,8 @@
 /* stores the default values for new connection. may be changed with sysctl */
 static const struct dccp_options dccpo_default_values = {
        .dccpo_sequence_window    = DCCPF_INITIAL_SEQUENCE_WINDOW,
-       .dccpo_ccid               = DCCPF_INITIAL_CCID,
+       .dccpo_rx_ccid            = DCCPF_INITIAL_CCID,
+       .dccpo_tx_ccid            = DCCPF_INITIAL_CCID,
        .dccpo_send_ack_vector    = DCCPF_INITIAL_SEND_ACK_VECTOR,
        .dccpo_send_ndp_count     = DCCPF_INITIAL_SEND_NDP_COUNT,
 };