dtls: fix building with older openssl libs

This commit is contained in:
Richard Aas 2016-02-29 08:12:37 +00:00
parent 60fa9db55c
commit a85f61b8a6

View file

@ -120,11 +120,15 @@ static long bio_ctrl(BIO *b, int cmd, long num, void *ptr)
/* The OpenSSL library needs this */
return 1;
#if defined (BIO_CTRL_DGRAM_QUERY_MTU)
case BIO_CTRL_DGRAM_QUERY_MTU:
return tc ? tc->sock->mtu : MTU_DEFAULT;
#endif
#if defined (BIO_CTRL_DGRAM_GET_FALLBACK_MTU)
case BIO_CTRL_DGRAM_GET_FALLBACK_MTU:
return MTU_FALLBACK;
#endif
}
return 0;