From 8f8c4d27eb2e023fd80986d8fdf8a68b37e3877e Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Wed, 18 Sep 2024 15:13:28 +0200 Subject: tcp: Allow checksum to be disabled We can need not to set TCP checksum. Add a parameter to tcp_fill_headers4() and tcp_fill_headers6() to disable it. Signed-off-by: Laurent Vivier Reviewed-by: David Gibson Signed-off-by: Stefano Brivio --- tcp_internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tcp_internal.h') diff --git a/tcp_internal.h b/tcp_internal.h index a450d85..de06db1 100644 --- a/tcp_internal.h +++ b/tcp_internal.h @@ -91,7 +91,8 @@ void tcp_rst_do(const struct ctx *c, struct tcp_tap_conn *conn); size_t tcp_l2_buf_fill_headers(const struct tcp_tap_conn *conn, struct iovec *iov, size_t dlen, - const uint16_t *check, uint32_t seq); + const uint16_t *check, uint32_t seq, + bool no_tcp_csum); int tcp_update_seqack_wnd(const struct ctx *c, struct tcp_tap_conn *conn, bool force_seq, struct tcp_info *tinfo); int tcp_prepare_flags(const struct ctx *c, struct tcp_tap_conn *conn, int flags, -- cgit v1.2.3