mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
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>
This commit is contained in:
parent
33a80c1d63
commit
5dd964aa02
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user