Commit 93de5f0c authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[3487] Ignore loopback interfaces when opening sockets.

parent fdc4cee6
......@@ -1806,7 +1806,11 @@ Dhcpv4Srv::openActiveSockets(const uint16_t port,
<< " instance of the interface when DHCPv4 server was"
<< " trying to reopen sockets after reconfiguration");
}
if (CfgMgr::instance().isActiveIface(iface->getName())) {
// Ignore loopback interfaces.
if (iface_ptr->flag_loopback_) {
iface_ptr->inactive4_ = true;
} else if (CfgMgr::instance().isActiveIface(iface->getName())) {
iface_ptr->inactive4_ = false;
LOG_INFO(dhcp4_logger, DHCP4_ACTIVATE_INTERFACE)
.arg(iface->getFullName());
......
......@@ -2440,7 +2440,12 @@ Dhcpv6Srv::openActiveSockets(const uint16_t port) {
<< " instance of the interface when DHCPv6 server was"
<< " trying to reopen sockets after reconfiguration");
}
if (CfgMgr::instance().isActiveIface(iface->getName())) {
// Ignore loopback interfaces.
if (iface_ptr->flag_loopback_) {
iface_ptr->inactive6_ = true;
} else if (CfgMgr::instance().isActiveIface(iface->getName())) {
iface_ptr->inactive6_ = false;
LOG_INFO(dhcp6_logger, DHCP6_ACTIVATE_INTERFACE)
.arg(iface->getFullName());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment