diff options
author | Guy Harris <guy@alum.mit.edu> | 2019-01-12 20:28:12 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-01-12 20:28:12 -0800 |
commit | 72a30b57e5caffffa1c22a78a3d1e06c4b900d0f (patch) | |
tree | 8ff66cfe9a327e04969bed7d2c370ea642436984 /rpcapd | |
parent | 10202701143fc9d9471318825a671373613058de (diff) | |
download | libpcap-72a30b57e5caffffa1c22a78a3d1e06c4b900d0f.tar.gz |
Log sock_check_hostlist() errors in rpcapd.
And make a getaddrinfo() failure an error, so that they're logged.
("The host trying to connect to us is not in the list" is not an error;
we tell the client about it, but we don't have a reason to log it.)
Diffstat (limited to 'rpcapd')
-rw-r--r-- | rpcapd/daemon.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/rpcapd/daemon.c b/rpcapd/daemon.c index 00717c93..368ca638 100644 --- a/rpcapd/daemon.c +++ b/rpcapd/daemon.c @@ -424,6 +424,13 @@ daemon_serviceloop(SOCKET sockctrl, int isactive, char *passiveClients, passiveClients = NULL; if (host_port_check_status < 0) { + if (host_port_check_status == -2) { + // + // We got an error; log it. + // + rpcapd_log(LOGPRIO_ERROR, "%s", errmsgbuf); + } + // // Sorry, we can't let you in. // |