tcp_ipv4.c (5800571960234f9d1f1011bf135799b2014d4268) | tcp_ipv4.c (a842fe1425cb20f457abd3f8ef98b468f83ca98b) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 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 * --- 752 unchanged lines hidden (view full) --- 761 } 762 763 BUILD_BUG_ON(offsetof(struct sock, sk_bound_dev_if) != 764 offsetof(struct inet_timewait_sock, tw_bound_dev_if)); 765 766 arg.tos = ip_hdr(skb)->tos; 767 arg.uid = sock_net_uid(net, sk && sk_fullsock(sk) ? sk : NULL); 768 local_bh_disable(); | 1// SPDX-License-Identifier: GPL-2.0-or-later 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 * --- 752 unchanged lines hidden (view full) --- 761 } 762 763 BUILD_BUG_ON(offsetof(struct sock, sk_bound_dev_if) != 764 offsetof(struct inet_timewait_sock, tw_bound_dev_if)); 765 766 arg.tos = ip_hdr(skb)->tos; 767 arg.uid = sock_net_uid(net, sk && sk_fullsock(sk) ? sk : NULL); 768 local_bh_disable(); |
769 ctl_sk = *this_cpu_ptr(net->ipv4.tcp_sk); 770 if (sk) | 769 ctl_sk = this_cpu_read(*net->ipv4.tcp_sk); 770 if (sk) { |
771 ctl_sk->sk_mark = (sk->sk_state == TCP_TIME_WAIT) ? 772 inet_twsk(sk)->tw_mark : sk->sk_mark; | 771 ctl_sk->sk_mark = (sk->sk_state == TCP_TIME_WAIT) ? 772 inet_twsk(sk)->tw_mark : sk->sk_mark; |
773 tcp_set_tx_time(skb, sk); 774 } |
|
773 ip_send_unicast_reply(ctl_sk, 774 skb, &TCP_SKB_CB(skb)->header.h4.opt, 775 ip_hdr(skb)->saddr, ip_hdr(skb)->daddr, 776 &arg, arg.iov[0].iov_len); 777 778 ctl_sk->sk_mark = 0; 779 __TCP_INC_STATS(net, TCP_MIB_OUTSEGS); 780 __TCP_INC_STATS(net, TCP_MIB_OUTRSTS); --- 72 unchanged lines hidden (view full) --- 853 ip_hdr(skb)->saddr, /* XXX */ 854 arg.iov[0].iov_len, IPPROTO_TCP, 0); 855 arg.csumoffset = offsetof(struct tcphdr, check) / 2; 856 if (oif) 857 arg.bound_dev_if = oif; 858 arg.tos = tos; 859 arg.uid = sock_net_uid(net, sk_fullsock(sk) ? sk : NULL); 860 local_bh_disable(); | 775 ip_send_unicast_reply(ctl_sk, 776 skb, &TCP_SKB_CB(skb)->header.h4.opt, 777 ip_hdr(skb)->saddr, ip_hdr(skb)->daddr, 778 &arg, arg.iov[0].iov_len); 779 780 ctl_sk->sk_mark = 0; 781 __TCP_INC_STATS(net, TCP_MIB_OUTSEGS); 782 __TCP_INC_STATS(net, TCP_MIB_OUTRSTS); --- 72 unchanged lines hidden (view full) --- 855 ip_hdr(skb)->saddr, /* XXX */ 856 arg.iov[0].iov_len, IPPROTO_TCP, 0); 857 arg.csumoffset = offsetof(struct tcphdr, check) / 2; 858 if (oif) 859 arg.bound_dev_if = oif; 860 arg.tos = tos; 861 arg.uid = sock_net_uid(net, sk_fullsock(sk) ? sk : NULL); 862 local_bh_disable(); |
861 ctl_sk = *this_cpu_ptr(net->ipv4.tcp_sk); 862 if (sk) 863 ctl_sk->sk_mark = (sk->sk_state == TCP_TIME_WAIT) ? 864 inet_twsk(sk)->tw_mark : sk->sk_mark; | 863 ctl_sk = this_cpu_read(*net->ipv4.tcp_sk); 864 ctl_sk->sk_mark = (sk->sk_state == TCP_TIME_WAIT) ? 865 inet_twsk(sk)->tw_mark : sk->sk_mark; 866 tcp_set_tx_time(skb, sk); |
865 ip_send_unicast_reply(ctl_sk, 866 skb, &TCP_SKB_CB(skb)->header.h4.opt, 867 ip_hdr(skb)->saddr, ip_hdr(skb)->daddr, 868 &arg, arg.iov[0].iov_len); 869 870 ctl_sk->sk_mark = 0; 871 __TCP_INC_STATS(net, TCP_MIB_OUTSEGS); 872 local_bh_enable(); --- 1859 unchanged lines hidden --- | 867 ip_send_unicast_reply(ctl_sk, 868 skb, &TCP_SKB_CB(skb)->header.h4.opt, 869 ip_hdr(skb)->saddr, ip_hdr(skb)->daddr, 870 &arg, arg.iov[0].iov_len); 871 872 ctl_sk->sk_mark = 0; 873 __TCP_INC_STATS(net, TCP_MIB_OUTSEGS); 874 local_bh_enable(); --- 1859 unchanged lines hidden --- |