aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv6.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/ipv6.c')
-rw-r--r--net/dccp/ipv6.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 116bddb64b80..dee085301576 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -1071,8 +1071,11 @@ static int dccp_v6_rcv(struct sk_buff **pskb)
1071 * Generate Reset(No Connection) unless P.type == Reset 1071 * Generate Reset(No Connection) unless P.type == Reset
1072 * Drop packet and return 1072 * Drop packet and return
1073 */ 1073 */
1074 if (sk == NULL) 1074 if (sk == NULL) {
1075 dccp_pr_debug("failed to look up flow ID in table and "
1076 "get corresponding socket\n");
1075 goto no_dccp_socket; 1077 goto no_dccp_socket;
1078 }
1076 1079
1077 /* 1080 /*
1078 * Step 2: 1081 * Step 2:
@@ -1080,8 +1083,11 @@ static int dccp_v6_rcv(struct sk_buff **pskb)
1080 * Generate Reset(No Connection) unless P.type == Reset 1083 * Generate Reset(No Connection) unless P.type == Reset
1081 * Drop packet and return 1084 * Drop packet and return
1082 */ 1085 */
1083 if (sk->sk_state == DCCP_TIME_WAIT) 1086 if (sk->sk_state == DCCP_TIME_WAIT) {
1084 goto do_time_wait; 1087 dccp_pr_debug("sk->sk_state == DCCP_TIME_WAIT: do_time_wait\n");
1088 inet_twsk_put(inet_twsk(sk));
1089 goto no_dccp_socket;
1090 }
1085 1091
1086 if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb)) 1092 if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb))
1087 goto discard_and_relse; 1093 goto discard_and_relse;
@@ -1101,22 +1107,14 @@ no_dccp_socket:
1101 DCCP_RESET_CODE_NO_CONNECTION; 1107 DCCP_RESET_CODE_NO_CONNECTION;
1102 dccp_v6_ctl_send_reset(skb); 1108 dccp_v6_ctl_send_reset(skb);
1103 } 1109 }
1104discard_it:
1105
1106 /*
1107 * Discard frame
1108 */
1109 1110
1111discard_it:
1110 kfree_skb(skb); 1112 kfree_skb(skb);
1111 return 0; 1113 return 0;
1112 1114
1113discard_and_relse: 1115discard_and_relse:
1114 sock_put(sk); 1116 sock_put(sk);
1115 goto discard_it; 1117 goto discard_it;
1116
1117do_time_wait:
1118 inet_twsk_put(inet_twsk(sk));
1119 goto no_dccp_socket;
1120} 1118}
1121 1119
1122static struct inet_connection_sock_af_ops dccp_ipv6_af_ops = { 1120static struct inet_connection_sock_af_ops dccp_ipv6_af_ops = {