summaryrefslogtreecommitdiffstats
path: root/src/osd/OSDMap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/OSDMap.cc')
-rw-r--r--src/osd/OSDMap.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/osd/OSDMap.cc b/src/osd/OSDMap.cc
index b87484c1a9d..9b3593d54e5 100644
--- a/src/osd/OSDMap.cc
+++ b/src/osd/OSDMap.cc
@@ -1642,12 +1642,10 @@ void OSDMap::get_out_of_subnet_osd_counts(CephContext *cct,
for (int i = 0; i < max_osd; i++) {
if (exists(i) && is_up(i)) {
if (const auto& addrs = get_addrs(i).v; addrs.size() >= 2) {
- auto v1_addr = addrs[0].ip_only_to_str();
- if (!is_addr_in_subnet(cct, public_network, v1_addr)) {
+ if (!is_addr_in_subnet(cct, public_network, addrs[0])) {
unreachable->emplace(i);
}
- auto v2_addr = addrs[1].ip_only_to_str();
- if (!is_addr_in_subnet(cct, public_network, v2_addr)) {
+ if (!is_addr_in_subnet(cct, public_network, addrs[1])) {
unreachable->emplace(i);
}
}