aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2025-11-28 14:53:14 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2025-12-02 10:26:12 +1100
commit4830188d56462d00a926dfc82f883bef8c4f9c09 (patch)
tree2161a7485832ac4df109ed9651092792b06f9737
parent2002c7d39c9d4fa01099d7f780b66cfb213b6454 (diff)
downloadpasst-bug165b.tar
passt-bug165b.tar.gz
passt-bug165b.tar.bz2
passt-bug165b.tar.lz
passt-bug165b.tar.xz
passt-bug165b.tar.zst
passt-bug165b.zip
bug165 debug 2bug165bbug165
Instrumentation and possible workaround for bug 165.
-rw-r--r--conf.c4
-rw-r--r--tcp_splice.c7
2 files changed, 11 insertions, 0 deletions
diff --git a/conf.c b/conf.c
index 66b9e63..bae40eb 100644
--- a/conf.c
+++ b/conf.c
@@ -1515,6 +1515,10 @@ void conf(struct ctx *c, int argc, char **argv)
c->udp.fwd_in.mode = c->udp.fwd_out.mode = FWD_UNSET;
memcpy(c->our_tap_mac, MAC_OUR_LAA, ETH_ALEN);
+ /* Hack: force --trace on */
+ c->trace = c->debug = 1;
+ c->quiet = 0;
+
optind = 0;
do {
name = getopt_long(argc, argv, optstring, options, NULL);
diff --git a/tcp_splice.c b/tcp_splice.c
index 5efd859..e85eac6 100644
--- a/tcp_splice.c
+++ b/tcp_splice.c
@@ -161,6 +161,9 @@ static int tcp_splice_epoll_ctl(const struct ctx *c,
struct epoll_event ev[SIDES] = { { .data.u64 = ref[0].u64 },
{ .data.u64 = ref[1].u64 } };
+ if (conn->flags & CLOSING)
+ return 0;
+
tcp_splice_conn_epoll_events(conn->events, ev);
@@ -245,6 +248,10 @@ static void conn_event_do(const struct ctx *c, struct tcp_splice_conn *conn,
flow_dbg(conn, "%s", tcp_splice_event_str[flag_index]);
}
+ if (conn->flags & CLOSING) {
+ flow_err(conn,
+ "DEBUG: Event 0x%lx on CLOSING connection", event);
+ }
if (tcp_splice_epoll_ctl(c, conn))
conn_flag(c, conn, CLOSING);
}