Browse Source

[3195] Bugfix in activate IPv6 interfaces

 - exceptions are now more verbose
Tomek Mrugalski 11 years ago
parent
commit
4d71b071d1
2 changed files with 6 additions and 3 deletions
  1. 1 1
      src/bin/dhcp6/dhcp6_srv.cc
  2. 5 2
      src/lib/dhcp/iface_mgr.cc

+ 1 - 1
src/bin/dhcp6/dhcp6_srv.cc

@@ -2229,7 +2229,7 @@ Dhcpv6Srv::openActiveSockets(const uint16_t port) {
                       << " trying to reopen sockets after reconfiguration");
         }
         if (CfgMgr::instance().isActiveIface(iface->getName())) {
-            iface_ptr->inactive4_ = false;
+            iface_ptr->inactive6_ = false;
             LOG_INFO(dhcp6_logger, DHCP6_ACTIVATE_INTERFACE)
                 .arg(iface->getFullName());
 

+ 5 - 2
src/lib/dhcp/iface_mgr.cc

@@ -375,7 +375,8 @@ bool IfaceMgr::openSockets6(const uint16_t port) {
 
             sock = openSocket(iface->getName(), *addr, port);
             if (sock < 0) {
-                isc_throw(SocketConfigError, "failed to open unicast socket");
+                isc_throw(SocketConfigError, "failed to open unicast socket on "
+                          << addr->toText() << " on interface " << iface->getName());
             }
 
             count++;
@@ -403,7 +404,9 @@ bool IfaceMgr::openSockets6(const uint16_t port) {
 
             sock = openSocket(iface->getName(), *addr, port);
             if (sock < 0) {
-                isc_throw(SocketConfigError, "failed to open unicast socket");
+                isc_throw(SocketConfigError, "failed to open link-local socket on "
+                          << addr->toText() << " on interface "
+                          << iface->getName());
             }
 
             // Binding socket to unicast address and then joining multicast group