Same as my previous comment, code reused from here:
https://github.com/theforeman/smart-proxy/blob/develop/lib/proxy/dhcp/server/native_ms.rb