ppc: upnp: ip address verify code factorization