From d902bb62885257ce19556e12af625abba67ccefd Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 28 Nov 2023 17:54:23 +0100 Subject: tcp: remove useless assignment In tcp_send_flag(), a4826ee04b76 has replaced: th->doff = sizeof(*th) / 4; th->doff += OPT_MSS_LEN / 4; th->doff += (1 + OPT_WS_LEN) / 4; by optlen = OPT_MSS_LEN + 1 + OPT_WS_LEN; th->doff = (sizeof(*th) + optlen) / 4; but forgot to remove the useless "th->doff += (1 + OPT_WS_LEN) / 4;" Fixes: a4826ee04b76 ("tcp: Defer and coalesce all segments with no data (flags) to handler") Signed-off-by: Laurent Vivier Reviewed-by: David Gibson Signed-off-by: Stefano Brivio --- tcp.c | 1 - 1 file changed, 1 deletion(-) (limited to 'tcp.c') diff --git a/tcp.c b/tcp.c index 44468ca..e683dd9 100644 --- a/tcp.c +++ b/tcp.c @@ -1693,7 +1693,6 @@ static int tcp_send_flag(struct ctx *c, struct tcp_tap_conn *conn, int flags) *(uint16_t *)data = htons(MIN(USHRT_MAX, mss)); data += OPT_MSS_LEN - 2; - th->doff += OPT_MSS_LEN / 4; conn->ws_to_tap = MIN(MAX_WS, tinfo.tcpi_snd_wscale); -- cgit v1.2.3