aboutgitcodebugslistschat
path: root/tcp_buf.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2024-10-21 18:40:29 +1100
committerStefano Brivio <sbrivio@redhat.com>2024-10-21 18:51:04 +0200
commit9e5df350d63b0819f04b44bb57ea146274a6b42f (patch)
treef82072c8b3db051be64510e97e335340cb96492d /tcp_buf.c
parentb4dace8f462b346ae2135af1f8d681a99a849a5f (diff)
downloadpasst-9e5df350d63b0819f04b44bb57ea146274a6b42f.tar
passt-9e5df350d63b0819f04b44bb57ea146274a6b42f.tar.gz
passt-9e5df350d63b0819f04b44bb57ea146274a6b42f.tar.bz2
passt-9e5df350d63b0819f04b44bb57ea146274a6b42f.tar.lz
passt-9e5df350d63b0819f04b44bb57ea146274a6b42f.tar.xz
passt-9e5df350d63b0819f04b44bb57ea146274a6b42f.tar.zst
passt-9e5df350d63b0819f04b44bb57ea146274a6b42f.zip
tcp: Use structures to construct initial TCP optionsHEADmaster
As a rule, we prefer constructing packets with matching C structures, rather than building them byte by byte. However, one case we still build byte by byte is the TCP options we include in SYN packets (in fact the only time we generate TCP options on the tap interface). Rework this to use a structure and initialisers which make it a bit clearer what's going on. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by; Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp_buf.c')
-rw-r--r--tcp_buf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tcp_buf.c b/tcp_buf.c
index 238827b..44df0e4 100644
--- a/tcp_buf.c
+++ b/tcp_buf.c
@@ -282,7 +282,7 @@ int tcp_buf_send_flag(const struct ctx *c, struct tcp_tap_conn *conn, int flags)
seq = conn->seq_to_tap;
ret = tcp_prepare_flags(c, conn, flags, &payload->th,
- payload->opts, &optlen);
+ &payload->opts, &optlen);
if (ret <= 0) {
if (CONN_V4(conn))
tcp4_flags_used--;