]> The Tcpdump Group git mirrors - libpcap/commitdiff
Send errors for select() failure or timeout with a version of 0.
authorGuy Harris <[email protected]>
Mon, 4 Feb 2019 09:55:43 +0000 (01:55 -0800)
committerGuy Harris <[email protected]>
Mon, 4 Feb 2019 09:55:43 +0000 (01:55 -0800)
If we haven't received a request containing a version number, send the
error reply with a version of 0.

rpcapd/daemon.c

index d513a458aa71a907b7d7cae0160acb1a6fd3dc98..b7059b83dd12f1a4b38ccb50169b6b143982b0b7 100644 (file)
@@ -749,7 +749,7 @@ daemon_serviceloop(SOCKET sockctrl, int isactive, char *passiveClients,
                        {
                                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 @@ daemon_serviceloop(SOCKET sockctrl, int isactive, char *passiveClients,
                        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);