diff options
Diffstat (limited to 'pcap-rpcap.c')
-rw-r--r-- | pcap-rpcap.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/pcap-rpcap.c b/pcap-rpcap.c index 88c4e75f..d4ff3f99 100644 --- a/pcap-rpcap.c +++ b/pcap-rpcap.c @@ -2215,16 +2215,6 @@ 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 @@ -2244,6 +2234,19 @@ pcap_t *pcap_open_rpcap(const char *source, int snaplen, int flags, int read_tim } /* + * We don't yet support DTLS, so if the user asks for a TLS + * connection and asks for data packets to be sent over UDP, + * we have to give up. + */ + if (pr->uses_ssl && (pr->rmt_flags & PCAP_OPENFLAG_DATATX_UDP)) + { + pcap_snprintf(errbuf, PCAP_ERRBUF_SIZE, + "TLS not supported with UDP forward of remote packets"); + pcap_close(fp); + return NULL; + } + + /* * Warning: this call can be the first one called by the user. * For this reason, we have to initialize the WinSock support. */ |