Send errors for select() failure or timeout with a version of 0.
If we haven't received a request containing a version number, send the
error reply with a version of 0.
diff --git a/rpcapd/daemon.c b/rpcapd/daemon.c
index d513a45..b7059b8 100644
--- a/rpcapd/daemon.c
+++ b/rpcapd/daemon.c
@@ -749,7 +749,7 @@
{
sock_geterror("select failed: ", errmsgbuf, PCAP_ERRBUF_SIZE);
if (rpcap_senderror(pars.sockctrl, pars.ssl,
- header.ver, PCAP_ERR_NETW,
+ 0, PCAP_ERR_NETW,
errmsgbuf, errbuf) == -1)
rpcapd_log(LOGPRIO_ERROR, "Send to client failed: %s", errbuf);
goto end;
@@ -760,8 +760,7 @@
if (retval == 0)
{
if (rpcap_senderror(pars.sockctrl, pars.ssl,
- header.ver,
- PCAP_ERR_INITTIMEOUT,
+ 0, PCAP_ERR_INITTIMEOUT,
"The RPCAP initial timeout has expired",
errbuf) == -1)
rpcapd_log(LOGPRIO_ERROR, "Send to client failed: %s", errbuf);