Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41618
b: refs/heads/master
c: d23c710
h: refs/heads/master
v: v3
  • Loading branch information
Gerrit Renker authored and David S. Miller committed Dec 3, 2006
1 parent b24f81b commit a359a59
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9b42078ed6edfe04e9dc9a59b946ad912aeef717
refs/heads/master: d23c7107bfbaac955289685c522c7ff99dad3780
15 changes: 4 additions & 11 deletions trunk/net/dccp/ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -910,8 +910,7 @@ static int dccp_v4_rcv(struct sk_buff *skb)
dccp_pr_debug_cat("\n");
} else {
DCCP_SKB_CB(skb)->dccpd_ack_seq = dccp_hdr_ack_seq(skb);
dccp_pr_debug_cat(", ack=%llu\n",
(unsigned long long)
dccp_pr_debug_cat(", ack=%llu\n", (unsigned long long)
DCCP_SKB_CB(skb)->dccpd_ack_seq);
}

Expand Down Expand Up @@ -940,11 +939,10 @@ static int dccp_v4_rcv(struct sk_buff *skb)
* Generate Reset(No Connection) unless P.type == Reset
* Drop packet and return
*/

if (sk->sk_state == DCCP_TIME_WAIT) {
dccp_pr_debug("sk->sk_state == DCCP_TIME_WAIT: "
"do_time_wait\n");
goto do_time_wait;
dccp_pr_debug("sk->sk_state == DCCP_TIME_WAIT: do_time_wait\n");
inet_twsk_put(inet_twsk(sk));
goto no_dccp_socket;
}

if (!xfrm4_policy_check(sk, XFRM_POLICY_IN, skb))
Expand All @@ -968,17 +966,12 @@ static int dccp_v4_rcv(struct sk_buff *skb)
}

discard_it:
/* Discard frame. */
kfree_skb(skb);
return 0;

discard_and_relse:
sock_put(sk);
goto discard_it;

do_time_wait:
inet_twsk_put(inet_twsk(sk));
goto no_dccp_socket;
}

static struct inet_connection_sock_af_ops dccp_ipv4_af_ops = {
Expand Down
22 changes: 10 additions & 12 deletions trunk/net/dccp/ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -1071,17 +1071,23 @@ static int dccp_v6_rcv(struct sk_buff **pskb)
* Generate Reset(No Connection) unless P.type == Reset
* Drop packet and return
*/
if (sk == NULL)
if (sk == NULL) {
dccp_pr_debug("failed to look up flow ID in table and "
"get corresponding socket\n");
goto no_dccp_socket;
}

/*
* Step 2:
* ... or S.state == TIMEWAIT,
* Generate Reset(No Connection) unless P.type == Reset
* Drop packet and return
*/
if (sk->sk_state == DCCP_TIME_WAIT)
goto do_time_wait;
if (sk->sk_state == DCCP_TIME_WAIT) {
dccp_pr_debug("sk->sk_state == DCCP_TIME_WAIT: do_time_wait\n");
inet_twsk_put(inet_twsk(sk));
goto no_dccp_socket;
}

if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb))
goto discard_and_relse;
Expand All @@ -1101,22 +1107,14 @@ static int dccp_v6_rcv(struct sk_buff **pskb)
DCCP_RESET_CODE_NO_CONNECTION;
dccp_v6_ctl_send_reset(skb);
}
discard_it:

/*
* Discard frame
*/

discard_it:
kfree_skb(skb);
return 0;

discard_and_relse:
sock_put(sk);
goto discard_it;

do_time_wait:
inet_twsk_put(inet_twsk(sk));
goto no_dccp_socket;
}

static struct inet_connection_sock_af_ops dccp_ipv6_af_ops = {
Expand Down

0 comments on commit a359a59

Please sign in to comment.