diff options
author | Martin Schwenke <martin@meltin.net> | 2022-08-15 09:41:09 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2022-09-20 10:43:37 +0000 |
commit | 5dd964aa0297b6e9ab8e1d0ff9fa0565c97ea43e (patch) | |
tree | 923a4b6a40fbd06a06d7b0edf7a8e13fc9d6cf95 /ctdb | |
parent | 33a80c1d63fd2e6163ef6c704b2e714e71b01384 (diff) | |
download | samba-5dd964aa0297b6e9ab8e1d0ff9fa0565c97ea43e.tar.gz |
ctdb-tools: Improve/add debug
In particular, knowing the reason fetching the packet fails can help
with debugging unsupported protocols in the pcap code.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/tools/ctdb_killtcp.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ctdb/tools/ctdb_killtcp.c b/ctdb/tools/ctdb_killtcp.c index bab81092058..007422f42fc 100644 --- a/ctdb/tools/ctdb_killtcp.c +++ b/ctdb/tools/ctdb_killtcp.c @@ -169,17 +169,18 @@ static void reset_connections_capture_tcp_handler(struct tevent_context *ev, &conn.server, &conn.client, &ack_seq, &seq, &rst, &window); if (ret != 0) { - /* probably a non-tcp ACK packet */ + /* Not a TCP-ACK? Unexpected protocol? */ + DBG_DEBUG("Failed to parse packet, errno=%d\n", ret); return; } if (window == htons(1234) && (rst || seq == 0)) { /* Ignore packets that we sent! */ - D_DEBUG("Ignoring packet: %s, " - "seq=%"PRIu32", ack_seq=%"PRIu32", " - "rst=%d, window=%"PRIu16"\n", - ctdb_connection_to_string(state, &conn, false), - seq, ack_seq, rst, ntohs(window)); + DBG_DEBUG("Ignoring sent packet: %s, " + "seq=%"PRIu32", ack_seq=%"PRIu32", " + "rst=%d, window=%"PRIu16"\n", + ctdb_connection_to_string(state, &conn, false), + seq, ack_seq, rst, ntohs(window)); return; } |