tcp: fix compilation of IPv4-only builds

PR:			256538
Reported by:		iron.udjin@gmail.com
MFC after:		3 days
Sponsored by:		Netflix, Inc.
This commit is contained in:
Michael Tuexen 2021-06-11 09:50:46 +02:00
parent 7aa2e90176
commit 224cf7b35b

View File

@ -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);
}