tcp_input.c (cee1af825d65b8122627fc2efbc36c1bd51ee103) | tcp_input.c (e13ec3da05d130f0d10da8e1fbe1be26dcdb0e27) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * INET An implementation of the TCP/IP protocol suite for the LINUX 4 * operating system. INET is implemented using the BSD Socket 5 * interface as the means of communication with the user level. 6 * 7 * Implementation of the Transmission Control Protocol(TCP). 8 * --- 4308 unchanged lines hidden (view full) --- 4317 * so just ignore the return value of mptcp_incoming_options(). 4318 */ 4319 if (sk_is_mptcp(sk)) 4320 mptcp_incoming_options(sk, skb); 4321 4322 /* We want the right error as BSD sees it (and indeed as we do). */ 4323 switch (sk->sk_state) { 4324 case TCP_SYN_SENT: | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * INET An implementation of the TCP/IP protocol suite for the LINUX 4 * operating system. INET is implemented using the BSD Socket 5 * interface as the means of communication with the user level. 6 * 7 * Implementation of the Transmission Control Protocol(TCP). 8 * --- 4308 unchanged lines hidden (view full) --- 4317 * so just ignore the return value of mptcp_incoming_options(). 4318 */ 4319 if (sk_is_mptcp(sk)) 4320 mptcp_incoming_options(sk, skb); 4321 4322 /* We want the right error as BSD sees it (and indeed as we do). */ 4323 switch (sk->sk_state) { 4324 case TCP_SYN_SENT: |
4325 sk->sk_err = ECONNREFUSED; | 4325 WRITE_ONCE(sk->sk_err, ECONNREFUSED); |
4326 break; 4327 case TCP_CLOSE_WAIT: | 4326 break; 4327 case TCP_CLOSE_WAIT: |
4328 sk->sk_err = EPIPE; | 4328 WRITE_ONCE(sk->sk_err, EPIPE); |
4329 break; 4330 case TCP_CLOSE: 4331 return; 4332 default: | 4329 break; 4330 case TCP_CLOSE: 4331 return; 4332 default: |
4333 sk->sk_err = ECONNRESET; | 4333 WRITE_ONCE(sk->sk_err, ECONNRESET); |
4334 } 4335 /* This barrier is coupled with smp_rmb() in tcp_poll() */ 4336 smp_wmb(); 4337 4338 tcp_write_queue_purge(sk); 4339 tcp_done(sk); 4340 4341 if (!sock_flag(sk, SOCK_DEAD)) --- 2730 unchanged lines hidden --- | 4334 } 4335 /* This barrier is coupled with smp_rmb() in tcp_poll() */ 4336 smp_wmb(); 4337 4338 tcp_write_queue_purge(sk); 4339 tcp_done(sk); 4340 4341 if (!sock_flag(sk, SOCK_DEAD)) --- 2730 unchanged lines hidden --- |