tcp_output.c (ebc01f593b58e1896150fc2e3cbdd0116323c52c) | tcp_output.c (f7b3bec6f5167efaf56b756abfafb924cb1d3050) |
---|---|
1/* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * Implementation of the Transmission Control Protocol(TCP). 7 * 8 * Authors: Ross Biro --- 319 unchanged lines hidden (view full) --- 328 else if (tcp_ca_needs_ecn(sk)) 329 INET_ECN_xmit(sk); 330} 331 332/* Packet ECN state for a SYN. */ 333static void tcp_ecn_send_syn(struct sock *sk, struct sk_buff *skb) 334{ 335 struct tcp_sock *tp = tcp_sk(sk); | 1/* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * Implementation of the Transmission Control Protocol(TCP). 7 * 8 * Authors: Ross Biro --- 319 unchanged lines hidden (view full) --- 328 else if (tcp_ca_needs_ecn(sk)) 329 INET_ECN_xmit(sk); 330} 331 332/* Packet ECN state for a SYN. */ 333static void tcp_ecn_send_syn(struct sock *sk, struct sk_buff *skb) 334{ 335 struct tcp_sock *tp = tcp_sk(sk); |
336 bool use_ecn = sock_net(sk)->ipv4.sysctl_tcp_ecn == 1 || 337 tcp_ca_needs_ecn(sk); |
|
336 | 338 |
339 if (!use_ecn) { 340 const struct dst_entry *dst = __sk_dst_get(sk); 341 342 if (dst && dst_feature(dst, RTAX_FEATURE_ECN)) 343 use_ecn = true; 344 } 345 |
|
337 tp->ecn_flags = 0; | 346 tp->ecn_flags = 0; |
338 if (sock_net(sk)->ipv4.sysctl_tcp_ecn == 1 || 339 tcp_ca_needs_ecn(sk)) { | 347 348 if (use_ecn) { |
340 TCP_SKB_CB(skb)->tcp_flags |= TCPHDR_ECE | TCPHDR_CWR; 341 tp->ecn_flags = TCP_ECN_OK; 342 if (tcp_ca_needs_ecn(sk)) 343 INET_ECN_xmit(sk); 344 } 345} 346 347static void --- 3018 unchanged lines hidden --- | 349 TCP_SKB_CB(skb)->tcp_flags |= TCPHDR_ECE | TCPHDR_CWR; 350 tp->ecn_flags = TCP_ECN_OK; 351 if (tcp_ca_needs_ecn(sk)) 352 INET_ECN_xmit(sk); 353 } 354} 355 356static void --- 3018 unchanged lines hidden --- |