The bit wise & operator throws an "Invalid argument: Invalid address length passed to IPAddress()" when applying it on two IPv6 addresses e.g.: 2001:4860:4860::8888 and f000:: .
The error seems to be thrown by IPAddress::IPAddress(const void* addr, poco_socklen_t length, Poco::UInt32 scope) when called in IPAddress IPAddress::operator & (const IPAddress& other) const with IPAddress(r.addr(), r.scope(), sizeof(struct in6_addr));.
This seems to be wrong, it should be IPAddress(r.addr(), sizeof(struct in6_addr),r.scope());