k_put(inet_twsk(sk)); 30. sk = sk2; 31. goto process; 32. } 33. /* Fall through to ACK */ 34. } 35. case TCP_TW_ACK: 36. tcp_v4_timewait_ack(sk, skb); 37. break; 论文网 38. case TCP_TW_RST: 39. goto no_tcp_socket; 40. case TCP_TW_SUCCESS:; 41. } 42. goto discard_it; 43.} int tcp_v4_rcv(struct sk_buff *skb) { ......
sk = __inet_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest); if (!sk) goto no_tcp_socket; process: if (sk->sk_state == TCP_TIME_WAIT) goto do_time_wait; ......
discard_it: /* Discard frame. */ kfree_skb(skb); return 0; ...... do_time_wait: ......
switch (tcp_timewait_state_process(inet_twsk(sk), skb, th)) { case TCP_TW_SYN: { struct sock *sk2 = inet_lookup_listener(dev_net(skb->dev), &tcp_hashinfo, iph->daddr, th->dest, inet_iif(skb)); if (sk2) { inet_twsk_deschedule(inet_twsk(sk), &tcp_death_row); inet_twsk_put(inet_twsk(sk)); sk = sk2; goto process; } /* Fall through to ACK */ 上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>
|