]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1237] Compilation fixes in dhcp4 and dhcp6 components.
authorTomek Mrugalski <tomasz@isc.org>
Tue, 13 Dec 2011 13:53:59 +0000 (14:53 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Tue, 13 Dec 2011 13:53:59 +0000 (14:53 +0100)
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp6/dhcp6_srv.cc
src/bin/dhcp6/dhcp6_srv.h
src/lib/dhcp/iface_mgr.cc
src/lib/dhcp/iface_mgr.h

index 780f3dc82706e3ac50253a4630a500e8bfbadd46..0a1aabad905194c639a7412cb57b526ec27ef9e9 100644 (file)
@@ -33,7 +33,10 @@ Dhcpv4Srv::Dhcpv4Srv(uint16_t port) {
     /// @todo: instantiate LeaseMgr here once it is imlpemented.
     IfaceMgr::instance().printIfaces();
 
+#if 0
+    // uncomment this once #1238, #992 and #1239 are merged
     IfaceMgr::instance().openSockets4(port);
+#endif
 
     setServerID();
 
index 31c6afb783a5d8984553b421fd29e0712a8becc9..b1264562645a788e496c518bcff8d7670c23d2b5 100644 (file)
@@ -43,7 +43,11 @@ Dhcpv6Srv::Dhcpv6Srv(uint16_t port) {
     }
 
     // Now try to open IPv6 sockets on detected interfaces.
+    cout << "Opening sockets on port " << port << endl;
+#if 0
+    // uncomment this once #1238, #992 and #1239 are merged
     IfaceMgr::instance().openSockets6(port);
+#endif
 
     /// @todo: instantiate LeaseMgr here once it is imlpemented.
 
index 72a4ed278b65c6431ce4e120cf6e144081ff54b0..c90d00daf439021c766393f6160ca8e909bba031 100644 (file)
@@ -17,8 +17,9 @@
 
 #include <boost/shared_ptr.hpp>
 #include <boost/noncopyable.hpp>
-#include "dhcp/pkt6.h"
-#include "dhcp/option.h"
+#include <dhcp/dhcp6.h>
+#include <dhcp/pkt6.h>
+#include <dhcp/option.h>
 #include <iostream>
 
 namespace isc {
index 18d2cd68bd6fc030d75cbb5b4397907fea48052d..651c07bdf46426b2994ca33beb443546e2ac39fc 100644 (file)
@@ -159,7 +159,7 @@ void IfaceMgr::detectIfaces() {
 }
 #endif
 
-bool IfaceMgr::openSockets6() {
+bool IfaceMgr::openSockets6(uint16_t port) {
     int sock;
 
     for (IfaceLst::iterator iface=ifaces_.begin();
@@ -175,8 +175,7 @@ bool IfaceMgr::openSockets6() {
                 continue;
             }
 
-            sock = openSocket(iface->name_, *addr,
-                              DHCP6_SERVER_PORT);
+            sock = openSocket(iface->name_, *addr, port);
             if (sock<0) {
                 cout << "Failed to open unicast socket." << endl;
                 return (false);
index ea0f43ae2c22e4237caeb665678abca87cc4aac6..2155ae8249ef03f35d1eb0b106c4da126b19918c 100644 (file)
@@ -237,8 +237,9 @@ protected:
 
 private:
     /// Opens sockets on detected interfaces.
-    bool
-    openSockets6();
+    ///
+    /// @param port specifies port on which sockets will be open
+    bool openSockets6(uint16_t port);
 
     /// creates a single instance of this class (a singleton implementation)
     static void