remove duplicated code and warn when master IP changes
Merge pull request #11663 from steverweber/ddnswip

remove duplicated code and warn when master IP changes