It's not clear to me if dropping support for this functionality was intentional.

Chain of events:

- #21689 removed test coverage due to a misunderstanding due, I believe, to this functionality being generally supported by all platforms except macOS which does not and returns a different format
- #21756 removed support and caused this regression
- #21690 restores the test coverage that would have caught this regression

Currently, neither the test coverage before #21689 nor the coverage restored by #21690 pass since the merge of #21756.

{
    valid = (addr.IsIPv4() || addr.IsIPv6()) && addr.m_net == mask.m_net;
    if (!valid) {
        return;
    }
    
    bool zeros_found = false;
    for (auto b : mask.m_addr) {
        const int num_bits = NetmaskBits(b);
        if (num_bits == -1 || (zeros_found && num_bits != 0)) {
            valid = false;
            return;
        }
        if (num_bits < 8) {
            zeros_found = true;
        }
    }
    assert(mask.m_addr.size() <= sizeof(netmask));
    memcpy(netmask, mask.m_addr.data(), mask.m_addr.size());
    network = addr;
    
    for (size_t x = 0; x < network.m_addr.size(); ++x) {
        network.m_addr[x] &= netmask[x];
    }
}
CSubNet::CSubNet(const CNetAddr& addr) : CSubNet()