aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2025-03-05 17:15:06 +1100
committerStefano Brivio <sbrivio@redhat.com>2025-03-07 02:21:24 +0100
commit27395e67c26a73e2e035360195b5928a07996dd5 (patch)
tree4db8288a682b98ccd1d3b97d943c91c43591549b
parent12d5b36b2f17a1ddc9447b925dbec161b4da346a (diff)
downloadpasst-27395e67c26a73e2e035360195b5928a07996dd5.tar
passt-27395e67c26a73e2e035360195b5928a07996dd5.tar.gz
passt-27395e67c26a73e2e035360195b5928a07996dd5.tar.bz2
passt-27395e67c26a73e2e035360195b5928a07996dd5.tar.lz
passt-27395e67c26a73e2e035360195b5928a07996dd5.tar.xz
passt-27395e67c26a73e2e035360195b5928a07996dd5.tar.zst
passt-27395e67c26a73e2e035360195b5928a07996dd5.zip
tcp: Don't export tcp_update_csum()
tcp_update_csum() is exposed in tcp_internal.h, but is only used in tcp.c. Remove the unneded prototype and make it static. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--tcp.c3
-rw-r--r--tcp_internal.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/tcp.c b/tcp.c
index 4c24367..32a08bd 100644
--- a/tcp.c
+++ b/tcp.c
@@ -787,7 +787,8 @@ static void tcp_sock_set_nodelay(int s)
* @th: TCP header (updated)
* @payload: TCP payload
*/
-void tcp_update_csum(uint32_t psum, struct tcphdr *th, struct iov_tail *payload)
+static void tcp_update_csum(uint32_t psum, struct tcphdr *th,
+ struct iov_tail *payload)
{
th->check = 0;
psum = csum_unfolded(th, sizeof(*th), psum);
diff --git a/tcp_internal.h b/tcp_internal.h
index 9cf31f5..6f5e054 100644
--- a/tcp_internal.h
+++ b/tcp_internal.h
@@ -166,8 +166,6 @@ void tcp_rst_do(const struct ctx *c, struct tcp_tap_conn *conn);
struct tcp_info_linux;
-void tcp_update_csum(uint32_t psum, struct tcphdr *th,
- struct iov_tail *payload);
void tcp_fill_headers(const struct tcp_tap_conn *conn,
struct tap_hdr *taph,
struct iphdr *ip4h, struct ipv6hdr *ip6h,