fix #2303: detect IPs of p2p interfaces