[dns] - check parameters for validity - fixes #13975 - credits to flaterichd