Skip to content

Commit 2b5efaf

Browse files
committed
enabling detection of IPv6 loopback interface on Linux
1 parent 7f611ed commit 2b5efaf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/interface_monitor_linux.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ class InterfaceMonitorImpl : public InterfaceMonitor {
199199
if (addrFamily == AF_INET6 && m_config->enableIPv6()) {
200200
if (RTA_PAYLOAD(rta) >= sizeof(ip::address_v6::bytes_type)) {
201201
ip::address_v6 addr6(*(ip::address_v6::bytes_type*)data);
202-
if (addr6.is_link_local()) {
202+
if (addr6.is_link_local() ||
203+
(m_config->enableLoopback() && addr6.is_loopback())) {
203204
addr6.scope_id(ifIndex);
204205
res.addr.emplace(addr6);
205206
}

0 commit comments

Comments
 (0)