[Pkg-voip-commits] [libre] 09/21: tls: add dtls_recv_packet() (#89)

Jonas Smedegaard dr at jones.dk
Sat Dec 2 22:41:35 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/0.5.6-1
in repository libre.

commit 14e312f86ccc80a7b0b6a807df03ef0d48781a91
Author: Alfred E. Heggestad <alfred.heggestad at gmail.com>
Date:   Mon Oct 30 15:13:11 2017 +0100

    tls: add dtls_recv_packet() (#89)
---
 include/re_tls.h          |  2 ++
 src/tls/openssl/tls_udp.c | 14 ++++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/include/re_tls.h b/include/re_tls.h
index aa45f60..050e049 100644
--- a/include/re_tls.h
+++ b/include/re_tls.h
@@ -90,6 +90,8 @@ void dtls_set_handlers(struct tls_conn *tc, dtls_estab_h *estabh,
 		       dtls_recv_h *recvh, dtls_close_h *closeh, void *arg);
 const struct sa *dtls_peer(const struct tls_conn *tc);
 void dtls_set_peer(struct tls_conn *tc, const struct sa *peer);
+void dtls_recv_packet(struct dtls_sock *sock, const struct sa *src,
+		      struct mbuf *mb);
 
 
 #ifdef USE_OPENSSL
diff --git a/src/tls/openssl/tls_udp.c b/src/tls/openssl/tls_udp.c
index e04cd87..7d518fb 100644
--- a/src/tls/openssl/tls_udp.c
+++ b/src/tls/openssl/tls_udp.c
@@ -829,6 +829,20 @@ void dtls_set_mtu(struct dtls_sock *sock, size_t mtu)
 }
 
 
+void dtls_recv_packet(struct dtls_sock *sock, const struct sa *src,
+		      struct mbuf *mb)
+{
+	struct sa addr;
+
+	if (!sock || !src || !mb)
+		return;
+
+	addr = *src;
+
+	recv_handler(&addr, mb, sock);
+}
+
+
 #ifdef TLS_BIO_OPAQUE
 BIO_METHOD *tls_method_udp(void)
 {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/libre.git



More information about the Pkg-voip-commits mailing list