Make sure the gateway is an IP

Ticket:	#2492