aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2021-06-11 07:50:46 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2021-06-13 23:27:17 +0000
commit7a2030a10686d156270c770d96f4ba4f86d4c58e (patch)
tree99d115d33a83b97ac09bb8a04c50e18751b29a4d
parente9dd950507ed02b7d9ef1f78334246e757b47894 (diff)
downloadsrc-7a2030a10686d156270c770d96f4ba4f86d4c58e.tar.gz
src-7a2030a10686d156270c770d96f4ba4f86d4c58e.zip
tcp: fix compilation of IPv4-only builds
PR: 256538 Reported by: iron.udjin@gmail.com Sponsored by: Netflix, Inc. (cherry picked from commit 224cf7b35b9bbe8d075f6004249d850c620b7855)
-rw-r--r--sys/netinet/tcp_stacks/rack.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
index f010c958951c..c4938e7b15a6 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -17673,9 +17673,11 @@ send:
th = rack->r_ctl.fsb.th;
udp = rack->r_ctl.fsb.udp;
if (udp) {
+#ifdef INET6
if (isipv6)
ulen = hdrlen + len - sizeof(struct ip6_hdr);
else
+#endif /* INET6 */
ulen = hdrlen + len - sizeof(struct ip);
udp->uh_ulen = htons(ulen);
}