" interface " << iface->getName());
continue;
- } else if (!iface->flag_up_ || !iface->flag_running_) {
+ }
+
+ IOAddress out_address("0.0.0.0");
+ if (!iface->flag_up_ || !iface->flag_running_ ||
+ !iface->getAddress4(out_address)) {
IFACEMGR_ERROR(SocketConfigError, error_handler,
"the interface " << iface->getName()
<< " is down or has no usable IPv4"
InterfaceListConfigParser::
InterfaceListConfigParser(const std::string& param_name)
- : activate_all_(false),
- param_name_(param_name) {
+ : param_name_(param_name) {
if (param_name_ != "interfaces") {
isc_throw(BadValue, "Internal error. Interface configuration "
"parser called for the wrong parameter: " << param_name);
typedef std::list<std::string> IfaceListStorage;
IfaceListStorage interfaces_;
- // Should server listen on all interfaces.
- bool activate_all_;
-
// Parsed parameter name
std::string param_name_;
};
available sooner.
% DHCPSRV_CFGMGR_ADD_IFACE listening on interface %1
-A debug message issued when new interface is being added to the collection of
+An info message issued when new interface is being added to the collection of
interfaces on which server listens to DHCP messages.
-% DHCPSRV_CFGMGR_ADD_UNICAST listening on unicast address %1 on interface %2
+% DHCPSRV_CFGMGR_ADD_UNICAST listening on unicast address %1, on interface %2
A debug message issued when new configuring DHCP server to listen on unicast
address on the specific interface.
// for some specific interface. This callback will simply log a
// warning message.
IfaceMgrErrorMsgCallback error_callback =
- boost::bind(&IfaceCfg::socketOpenErrorHandler, this, _1);
+ boost::bind(&IfaceCfg::socketOpenErrorHandler, _1);
bool sopen;
if (getFamily() == V4) {
sopen = IfaceMgr::instance().openSockets4(port, use_bcast,
}
// All ok, add interface.
- LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE,
- DHCPSRV_CFGMGR_ADD_IFACE)
+ LOG_INFO(dhcpsrv_logger, DHCPSRV_CFGMGR_ADD_IFACE)
.arg(name);
iface_set_.insert(name);
"because other unicast address has already been"
" specified for this interface");
}
- LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE, DHCPSRV_CFGMGR_ADD_UNICAST)
+ LOG_INFO(dhcpsrv_logger, DHCPSRV_CFGMGR_ADD_UNICAST)
.arg(addr.toText()).arg(name);
unicast_map_.insert(std::pair<std::string, IOAddress>(name, addr));
}
/// parameter.
///
/// @param errmsg Error message being logged by the function.
- void socketOpenErrorHandler(const std::string& errmsg);
+ static void socketOpenErrorHandler(const std::string& errmsg);
/// @brief Protocol family.
Family family_;