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-11 07:50:46 +0000
commit224cf7b35b9bbe8d075f6004249d850c620b7855 (patch)
treefffb7315da83a8529ee8492256702aea952753d8
parent7aa2e90176baaca3bf4a6813defeb3c4b08cac8a (diff)
downloadsrc-224cf7b35b9bbe8d075f6004249d850c620b7855.tar.gz
src-224cf7b35b9bbe8d075f6004249d850c620b7855.zip
tcp: fix compilation of IPv4-only builds
PR: 256538 Reported by: iron.udjin@gmail.com MFC after: 3 days Sponsored by: Netflix, Inc.
-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 5227ea59ba23..6ce866b77450 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -17677,9 +17677,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);
}