diff --git a/src/util/network/if_number_from_address.cpp b/src/util/network/if_number_from_address.cpp index 8c7934d40..699f78382 100644 --- a/src/util/network/if_number_from_address.cpp +++ b/src/util/network/if_number_from_address.cpp @@ -38,7 +38,7 @@ namespace util { } // Find the correct interface to join on (the one that has our bind address) - for (auto& iface : get_interfaces()) { + for (const auto& iface : get_interfaces()) { // iface must be, ipv6, and have the same address as our bind address if (iface.ip.sock.sa_family == AF_INET6 && ::memcmp(iface.ip.ipv6.sin6_addr.s6_addr, ipv6.sin6_addr.s6_addr, sizeof(in6_addr)) == 0) {