On Fri, Mar 20, 2026 at 02:51:16PM +0100, Laurent Vivier wrote:
tcp_prepare_flags() unconditionally sets th->doff and th->ack, so setting them right after the memset() is redundant.
Signed-off-by: Laurent Vivier
Reviewed-by: David Gibson
--- tcp_vu.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/tcp_vu.c b/tcp_vu.c index 9c4e916b1b8d..7a348eb01248 100644 --- a/tcp_vu.c +++ b/tcp_vu.c @@ -115,8 +115,6 @@ int tcp_vu_send_flag(const struct ctx *c, struct tcp_tap_conn *conn, int flags) }
memset(th, 0, sizeof(*th)); - th->doff = sizeof(*th) / 4; - th->ack = 1;
seq = conn->seq_to_tap; opts = (struct tcp_syn_opts *)(th + 1); -- 2.53.0
-- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson