diff --git a/dtls-bio.c b/dtls-bio.c index 6e118eeb93..f566b29ffb 100644 --- a/dtls-bio.c +++ b/dtls-bio.c @@ -25,6 +25,9 @@ void janus_dtls_bio_agent_set_mtu(int start_mtu) { mtu = start_mtu; JANUS_LOG(LOG_VERB, "Setting starting MTU in the DTLS BIO writer: %d\n", mtu); } +int janus_dtls_bio_agent_get_mtu(void) { + return mtu; +} /* BIO implementation */ static int janus_dtls_bio_agent_write(BIO *h, const char *buf, int num); diff --git a/dtls-bio.h b/dtls-bio.h index ce18413064..92f06d7c0a 100644 --- a/dtls-bio.h +++ b/dtls-bio.h @@ -27,9 +27,12 @@ BIO *BIO_janus_dtls_agent_new(void *dtls); * you know for sure the MTU in the network Janus is deployed in is * smaller than that, it makes sense to configure an according value to * start from - * @param start_mtu The MTU to start from (1472 by default) + * @param start_mtu The MTU to start from (1200 by default) */ void janus_dtls_bio_agent_set_mtu(int start_mtu); +/*! \brief Return which MTU was configured for the BIO agent writer + * @returns The MTU the stack will start from for each session */ +int janus_dtls_bio_agent_get_mtu(void); #if defined(LIBRESSL_VERSION_NUMBER) #define JANUS_USE_OPENSSL_PRE_1_1_API (1) diff --git a/janus.c b/janus.c index 8359b223ac..7e103a15f3 100644 --- a/janus.c +++ b/janus.c @@ -353,6 +353,7 @@ static json_t *janus_info(const char *transaction) { json_object_set_new(info, "twcc-period", json_integer(janus_get_twcc_period())); if(janus_get_dscp() > 0) json_object_set_new(info, "dscp", json_integer(janus_get_dscp())); + json_object_set_new(info, "dtls-mtu", json_integer(janus_dtls_bio_agent_get_mtu())); if(janus_ice_get_stun_server() != NULL) { char server[255]; g_snprintf(server, 255, "%s:%"SCNu16, janus_ice_get_stun_server(), janus_ice_get_stun_port());