Added logic to check the local network address