aboutgitcodebugslistschat
diff options
context:
space:
mode:
-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);
}