From 2972769d03dd60d4bce233a12d77a3464f0d9dc4 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 28 Nov 2017 13:45:25 -0800 Subject: [PATCH] Fail if a given protocol version *isn't* supported. (Broken when RPCAP_VERSION_IS_SUPPORTED() was introduced.) --- pcap-rpcap.c | 2 +- rpcapd/daemon.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pcap-rpcap.c b/pcap-rpcap.c index 84d3af5cc8..d0b4d99bfe 100644 --- a/pcap-rpcap.c +++ b/pcap-rpcap.c @@ -1976,7 +1976,7 @@ static int rpcap_sendauth(SOCKET sock, uint8 *ver, struct pcap_rmtauth *auth, ch * * Do we also support it? */ - if (RPCAP_VERSION_IS_SUPPORTED(header.ver)) + if (!RPCAP_VERSION_IS_SUPPORTED(header.ver)) { /* * No, so there's no version we both support. diff --git a/rpcapd/daemon.c b/rpcapd/daemon.c index 0dd814f153..59a9863343 100755 --- a/rpcapd/daemon.c +++ b/rpcapd/daemon.c @@ -237,7 +237,7 @@ void *daemon_serviceloop(void *ptr) // // Did the client specify a version we can handle? // - if (RPCAP_VERSION_IS_SUPPORTED(header.ver)) + if (!RPCAP_VERSION_IS_SUPPORTED(header.ver)) { // // Tell them it's not a valid protocol version.