tcp: clear sendfile logging struct

The sendfile black box logging struct is much smaller than the
encompassing stack specific logging union. Be sure to clear the
trailing unused memory when logging.

Reviewed by:	tuexen
Sponsored by:	Netflix, Inc.

(cherry picked from commit 3bd1e85fc13cb90853046300dcaa31d63b45ee21)
This commit is contained in:
Peter Lei 2025-04-04 22:07:09 +02:00 committed by Franco Fichtner
parent 4d2ba6d834
commit 8b88f44f84

View File

@ -2873,6 +2873,7 @@ tcp_log_sendfile(struct socket *so, off_t offset, size_t nbytes, int flags)
struct timeval tv;
tcp_log_eventspecific_t log;
memset(&log, 0, sizeof(log));
microuptime(&tv);
log.u_sf.offset = offset;
log.u_sf.length = nbytes;