Check for non-zero ips on both public and private ips.

Change-Id: I25b88c94fcd164fdbb5a35d804a0c7406dd5edb5