Add DTLS, other fixes from Gonzalo Salgueiro