If it can be any type of address, then simply don't specify the type. This
is less confusing for humans.
Signed-off-by: Sage Weil <sage@redhat.com>
if (addr.type == entity_addr_t::TYPE_NONE) {
return out << "-";
}
- out << entity_addr_t::get_type_name(addr.type) << ":"
- << addr.get_sockaddr() << '/' << addr.nonce;
+ if (addr.type != entity_addr_t::TYPE_ANY) {
+ out << entity_addr_t::get_type_name(addr.type) << ":";
+ }
+ out << addr.get_sockaddr() << '/' << addr.nonce;
return out;
}