aboutsummaryrefslogtreecommitdiff
path: root/pcap-rpcap.c
diff options
context:
space:
mode:
authorCedric Cellier <rixed@happyleptic.org>2018-06-09 11:24:21 +0200
committerCedric Cellier <rixed@happyleptic.org>2018-09-13 08:26:46 +0200
commite6796ccd1c07e806a49f8821480a566dee85c1ee (patch)
tree6a67664c58210dc7415a5ee65efe739008566257 /pcap-rpcap.c
parentd1bf5b454659dd04aa9b3a4281ffe1d0d4299cf3 (diff)
Disable the combination of SSL + UDP
As DTLS is not implemented (yet).
Diffstat (limited to 'pcap-rpcap.c')
-rw-r--r--pcap-rpcap.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/pcap-rpcap.c b/pcap-rpcap.c
index e5a2b35e..7dba6d59 100644
--- a/pcap-rpcap.c
+++ b/pcap-rpcap.c
@@ -2213,6 +2213,16 @@ pcap_t *pcap_open_rpcap(const char *source, int snaplen, int flags, int read_tim
pr = fp->priv;
pr->rmt_flags = flags;
+ // Also, SSL is not supported with UDP at the moment, so if the user
+ // asks for both we'd better bail out now:
+ if (pr->uses_ssl && (pr->rmt_flags & PCAP_OPENFLAG_DATATX_UDP))
+ {
+ pcap_close(fp);
+ pcap_snprintf(errbuf, PCAP_ERRBUF_SIZE,
+ "SSL not supported with UDP forward of remote packets");
+ return NULL;
+ }
+
/*
* determine the type of the source (NULL, file, local, remote)
* You must have a valid source string even if we're in active mode, because otherwise