Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109810103
D40423.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D40423.diff
View Options
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -18826,7 +18826,7 @@
}
#ifdef INET6
if (rack->r_is_v6) {
- error = ip6_output(m, NULL,
+ error = ip6_output(m, inp->in6p_outputopts,
&inp->inp_route6,
ip_sendflag, NULL, NULL, inp);
}
@@ -19338,7 +19338,7 @@
lgb = NULL;
#ifdef INET6
if (rack->r_is_v6) {
- error = ip6_output(m, NULL,
+ error = ip6_output(m, inp->in6p_outputopts,
&inp->inp_route6,
0, NULL, NULL, inp);
}
@@ -21792,11 +21792,7 @@
TCP_PROBE5(send, NULL, tp, ip6, tp, th);
/* TODO: IPv6 IP6TOS_ECT bit on */
error = ip6_output(m,
-#if defined(IPSEC) || defined(IPSEC_SUPPORT)
inp->in6p_outputopts,
-#else
- NULL,
-#endif
&inp->inp_route6,
((rsm || sack_rxmit) ? IP_NO_SND_TAG_RL : 0),
NULL, NULL, inp);
@@ -23448,10 +23444,6 @@
rack_set_sockopt(struct tcpcb *tp, struct sockopt *sopt)
{
struct inpcb *inp = tptoinpcb(tp);
-#ifdef INET6
- struct ip6_hdr *ip6;
- int32_t mask, tclass;
-#endif
#ifdef INET
struct ip *ip;
#endif
@@ -23465,9 +23457,6 @@
INP_WUNLOCK(inp);
return (EINVAL);
}
-#ifdef INET6
- ip6 = (struct ip6_hdr *)rack->r_ctl.fsb.tcp_ip_hdr;
-#endif
#ifdef INET
ip = (struct ip *)rack->r_ctl.fsb.tcp_ip_hdr;
#endif
@@ -23480,18 +23469,6 @@
case IPV6_USE_MIN_MTU:
tcp6_use_min_mtu(tp);
break;
- case IPV6_TCLASS:
- /*
- * The DSCP codepoint has changed, update the fsb
- * by overwriting any previous traffic class.
- */
- if (inp->in6p_outputopts) {
- mask = 0xfc;
- tclass = inp->in6p_outputopts->ip6po_tclass;
- ip6->ip6_flow &= htonl((~mask) << 20);
- ip6->ip6_flow |= htonl((tclass & mask) << 20);
- }
- break;
}
INP_WUNLOCK(inp);
return (0);
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -2049,9 +2049,15 @@
ulen = tlen - sizeof(struct ip);
uh->uh_ulen = htons(ulen);
}
- ip->ip_tos = ect;
ip->ip_len = htons(tlen);
- ip->ip_ttl = V_ip_defttl;
+ if (inp != NULL) {
+ ip->ip_tos = inp->inp_ip_tos & ~IPTOS_ECN_MASK;
+ ip->ip_ttl = inp->inp_ip_ttl;
+ } else {
+ ip->ip_tos = 0;
+ ip->ip_ttl = V_ip_defttl;
+ }
+ ip->ip_tos |= ect;
if (port) {
ip->ip_p = IPPROTO_UDP;
} else {
@@ -2195,7 +2201,8 @@
#ifdef INET6
if (isipv6) {
TCP_PROBE5(send, NULL, tp, ip6, tp, nth);
- output_ret = ip6_output(m, NULL, NULL, 0, NULL, NULL, inp);
+ output_ret = ip6_output(m, inp ? inp->in6p_outputopts : NULL,
+ NULL, 0, NULL, NULL, inp);
}
#endif /* INET6 */
#if defined(INET) && defined(INET6)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 10, 8:09 PM (8 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16582957
Default Alt Text
D40423.diff (2 KB)
Attached To
Mode
D40423: tcp: improve sending of TTL/hoplimit and DSCP
Attached
Detach File
Event Timeline
Log In to Comment