Previously, the sockets were closed just before opening a new set of
sockets, rather than before reconfiguring the IfaceMgr. Some steps of the
IfaceMgr reconfiguration failed when sockets were still open, which
effectively led to inability to reconfigure the running server.
// inactive.
setState(family, !wildcard_used_, true);
IfaceMgr& iface_mgr = IfaceMgr::instance();
+ // Close any open sockets because we're going to modify some properties
+ // of the IfaceMgr. Those modifications require that sockets are closed.
+ closeSockets();
// Remove selection of unicast addresses from all interfaces.
iface_mgr.clearUnicasts();
// For the DHCPv4 server, if the user has selected that raw sockets
}
}
- // Before opening any sockets, close existing ones.
- closeSockets();
-
// Set the callback which is called when the socket fails to open
// for some specific interface. This callback will simply log a
// warning message.