Page MenuHomeFreeBSD

D34148.id102280.diff
No OneTemporary

D34148.id102280.diff

Index: sys/netinet/tcp_output.c
===================================================================
--- sys/netinet/tcp_output.c
+++ sys/netinet/tcp_output.c
@@ -1223,11 +1223,16 @@
!((tp->t_flags & TF_FORCEDATA) && len == 1 &&
SEQ_LT(tp->snd_una, tp->snd_max))) {
#ifdef INET6
- if (isipv6)
+ if (isipv6) {
+ ip6->ip6_flow &= ~htonl(IPTOS_ECN_MASK << 20);
ip6->ip6_flow |= htonl(IPTOS_ECN_ECT0 << 20);
+ }
else
#endif
+ {
+ ip->ip_tos &= ~IPTOS_ECN_MASK;
ip->ip_tos |= IPTOS_ECN_ECT0;
+ }
TCPSTAT_INC(tcps_ecn_ect0);
/*
* Reply with proper ECN notifications.
Index: sys/netinet/tcp_stacks/rack.c
===================================================================
--- sys/netinet/tcp_stacks/rack.c
+++ sys/netinet/tcp_stacks/rack.c
@@ -16542,11 +16542,16 @@
*/
if (len > 0 && SEQ_GEQ(tp->snd_nxt, tp->snd_max)) {
#ifdef INET6
- if (rack->r_is_v6)
+ if (rack->r_is_v6) {
+ ip6->ip6_flow &= ~htonl(IPTOS_ECN_MASK << 20);
ip6->ip6_flow |= htonl(IPTOS_ECN_ECT0 << 20);
+ }
else
#endif
+ {
+ ip->ip_tos &= ~IPTOS_ECN_MASK;
ip->ip_tos |= IPTOS_ECN_ECT0;
+ }
KMOD_TCPSTAT_INC(tcps_ecn_ect0);
/*
* Reply with proper ECN notifications.
@@ -18619,11 +18624,16 @@
if (len > 0 && SEQ_GEQ(tp->snd_nxt, tp->snd_max) &&
(sack_rxmit == 0)) {
#ifdef INET6
- if (isipv6)
+ if (isipv6) {
+ ip6->ip6_flow &= ~htonl(IPTOS_ECN_MASK << 20);
ip6->ip6_flow |= htonl(IPTOS_ECN_ECT0 << 20);
+ }
else
#endif
+ {
+ ip->ip_tos &= IPTOS_ECN_MASK;
ip->ip_tos |= IPTOS_ECN_ECT0;
+ }
KMOD_TCPSTAT_INC(tcps_ecn_ect0);
/*
* Reply with proper ECN notifications.

File Metadata

Mime Type
text/plain
Expires
Fri, Jun 26, 6:14 AM (7 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34345558
Default Alt Text
D34148.id102280.diff (1 KB)

Event Timeline