diff options
author | Martin Schwenke <martin@meltin.net> | 2022-08-15 14:30:09 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2022-09-20 10:43:37 +0000 |
commit | 33a80c1d63fd2e6163ef6c704b2e714e71b01384 (patch) | |
tree | 0ddffde920635bd700139c263875f13d5d24fede /ctdb | |
parent | 075414dc05455a5cd33a244efd51be60fc294e95 (diff) | |
download | samba-33a80c1d63fd2e6163ef6c704b2e714e71b01384.tar.gz |
ctdb-common: Improve/add debug
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/common/system_socket.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ctdb/common/system_socket.c b/ctdb/common/system_socket.c index 74fe1593a01..e8ccd301f6c 100644 --- a/ctdb/common/system_socket.c +++ b/ctdb/common/system_socket.c @@ -880,7 +880,7 @@ int ctdb_sys_open_capture_socket(const char *iface, void **private_data) return -1; } - DBG_DEBUG("Created RAW SOCKET FD:%d for tcp tickle\n", s); + DBG_DEBUG("Opened raw socket for TCP tickle capture (fd=%d)\n", s); ret = set_blocking(s, false); if (ret != 0) { @@ -971,6 +971,7 @@ int ctdb_sys_open_capture_socket(const char *iface, void **private_data) { char errbuf[PCAP_ERRBUF_SIZE]; pcap_t *pt; + int fd; pt = pcap_open_live(iface, 100, 0, 0, errbuf); if (pt == NULL) { @@ -980,8 +981,11 @@ int ctdb_sys_open_capture_socket(const char *iface, void **private_data) return -1; } *((pcap_t **)private_data) = pt; + fd = pcap_get_selectable_fd(pt); - return pcap_get_selectable_fd(pt); + DBG_DEBUG("Opened pcap capture for TCP tickle capture (fd=%d)\n", fd); + + return fd; } int ctdb_sys_close_capture_socket(void *private_data) |