aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2023-11-28 17:54:23 +0100
committerStefano Brivio <sbrivio@redhat.com>2023-12-04 09:50:51 +0100
commitd902bb62885257ce19556e12af625abba67ccefd (patch)
tree1a4c573559bcfd0dbc92acf9a7217866e13b0a93
parentbae676a44e7f7e49209f380523b1516e6c824acf (diff)
downloadpasst-d902bb62885257ce19556e12af625abba67ccefd.tar
passt-d902bb62885257ce19556e12af625abba67ccefd.tar.gz
passt-d902bb62885257ce19556e12af625abba67ccefd.tar.bz2
passt-d902bb62885257ce19556e12af625abba67ccefd.tar.lz
passt-d902bb62885257ce19556e12af625abba67ccefd.tar.xz
passt-d902bb62885257ce19556e12af625abba67ccefd.tar.zst
passt-d902bb62885257ce19556e12af625abba67ccefd.zip
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 <lvivier@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--tcp.c1
1 files changed, 0 insertions, 1 deletions
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);