dhcp: introduce hostname validation

The DHCP client could send invalid hostname. We need to do a validation
for the hostname when sending from config.