Browse Source

[1237] Compilation fix

Note: this fix is also present on other branches.
Tomek Mrugalski 13 years ago
parent
commit
4b226d86ea
3 changed files with 10 additions and 2 deletions
  1. 3 0
      src/bin/dhcp4/dhcp4_srv.cc
  2. 4 1
      src/bin/dhcp6/dhcp6_srv.cc
  3. 3 1
      src/bin/dhcp6/dhcp6_srv.h

+ 3 - 0
src/bin/dhcp4/dhcp4_srv.cc

@@ -31,6 +31,9 @@ Dhcpv4Srv::Dhcpv4Srv(uint16_t port) {
     IfaceMgr::instance();
 
     /// @todo: instantiate LeaseMgr here once it is imlpemented.
+    IfaceMgr::instance().printIfaces();
+
+    IfaceMgr::instance().openSockets4(port);
 
     setServerID();
 

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

@@ -25,7 +25,7 @@ using namespace isc;
 using namespace isc::dhcp;
 using namespace isc::asiolink;
 
-Dhcpv6Srv::Dhcpv6Srv() {
+Dhcpv6Srv::Dhcpv6Srv(uint16_t port) {
     cout << "Initialization" << endl;
 
     // first call to instance() will create IfaceMgr (it's a singleton)
@@ -42,6 +42,9 @@ Dhcpv6Srv::Dhcpv6Srv() {
 	shutdown = true;
     }
 
+    // Now try to open IPv6 sockets on detected interfaces.
+    IfaceMgr::instance().openSockets6(port);
+
     /// @todo: instantiate LeaseMgr here once it is imlpemented.
 
     setServerID();

+ 3 - 1
src/bin/dhcp6/dhcp6_srv.h

@@ -41,7 +41,9 @@ public:
     /// In particular, creates IfaceMgr that will be responsible for
     /// network interaction. Will instantiate lease manager, and load
     /// old or create new DUID.
-    Dhcpv6Srv();
+    ///
+    /// @param port port on will all sockets will listen
+    Dhcpv6Srv(uint16_t port = DHCP6_SERVER_PORT);
 
     /// @brief Destructor. Used during DHCPv6 service shutdown.
     ~Dhcpv6Srv();