aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv4.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/ipv4.c')
-rw-r--r--net/dccp/ipv4.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 38321ad81875..fcfb486f90c2 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -28,6 +28,7 @@
28#include "ackvec.h" 28#include "ackvec.h"
29#include "ccid.h" 29#include "ccid.h"
30#include "dccp.h" 30#include "dccp.h"
31#include "feat.h"
31 32
32struct inet_hashinfo __cacheline_aligned dccp_hashinfo = { 33struct inet_hashinfo __cacheline_aligned dccp_hashinfo = {
33 .lhash_lock = RW_LOCK_UNLOCKED, 34 .lhash_lock = RW_LOCK_UNLOCKED,
@@ -535,7 +536,8 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
535 if (req == NULL) 536 if (req == NULL)
536 goto drop; 537 goto drop;
537 538
538 /* FIXME: process options */ 539 if (dccp_parse_options(sk, skb))
540 goto drop;
539 541
540 dccp_openreq_init(req, &dp, skb); 542 dccp_openreq_init(req, &dp, skb);
541 543
@@ -1049,6 +1051,8 @@ int dccp_v4_init_sock(struct sock *sk)
1049 * setsockopt(CCIDs-I-want/accept). -acme 1051 * setsockopt(CCIDs-I-want/accept). -acme
1050 */ 1052 */
1051 if (likely(!dccp_ctl_socket_init)) { 1053 if (likely(!dccp_ctl_socket_init)) {
1054 int rc;
1055
1052 if (dp->dccps_options.dccpo_send_ack_vector) { 1056 if (dp->dccps_options.dccpo_send_ack_vector) {
1053 dp->dccps_hc_rx_ackvec = dccp_ackvec_alloc(GFP_KERNEL); 1057 dp->dccps_hc_rx_ackvec = dccp_ackvec_alloc(GFP_KERNEL);
1054 if (dp->dccps_hc_rx_ackvec == NULL) 1058 if (dp->dccps_hc_rx_ackvec == NULL)
@@ -1069,8 +1073,16 @@ int dccp_v4_init_sock(struct sock *sk)
1069 dp->dccps_hc_rx_ccid = dp->dccps_hc_tx_ccid = NULL; 1073 dp->dccps_hc_rx_ccid = dp->dccps_hc_tx_ccid = NULL;
1070 return -ENOMEM; 1074 return -ENOMEM;
1071 } 1075 }
1072 } else 1076
1077 rc = dccp_feat_init(sk);
1078 if (rc)
1079 return rc;
1080 } else {
1081 /* control socket doesn't need feat nego */
1082 INIT_LIST_HEAD(&dp->dccps_options.dccpo_pending);
1083 INIT_LIST_HEAD(&dp->dccps_options.dccpo_conf);
1073 dccp_ctl_socket_init = 0; 1084 dccp_ctl_socket_init = 0;
1085 }
1074 1086
1075 dccp_init_xmit_timers(sk); 1087 dccp_init_xmit_timers(sk);
1076 icsk->icsk_rto = DCCP_TIMEOUT_INIT; 1088 icsk->icsk_rto = DCCP_TIMEOUT_INIT;
@@ -1118,6 +1130,9 @@ int dccp_v4_destroy_sock(struct sock *sk)
1118 ccid_exit(dp->dccps_hc_tx_ccid, sk); 1130 ccid_exit(dp->dccps_hc_tx_ccid, sk);
1119 dp->dccps_hc_rx_ccid = dp->dccps_hc_tx_ccid = NULL; 1131 dp->dccps_hc_rx_ccid = dp->dccps_hc_tx_ccid = NULL;
1120 1132
1133 /* clean up feature negotiation state */
1134 dccp_feat_clean(sk);
1135
1121 return 0; 1136 return 0;
1122} 1137}
1123 1138