On Tue, Nov 28, 2023 at 05:54:23PM +0100, Laurent Vivier wrote: > 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") > Cc: sbrivio@redhat.com > Signed-off-by: Laurent Vivier Reviewed-by: David Gibson > --- > tcp.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/tcp.c b/tcp.c > index 40e3dec1ca2d..bf5f315afcac 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); > -- David Gibson | 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