]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1540] Changes after review:
authorTomek Mrugalski <tomasz@isc.org>
Tue, 8 May 2012 16:17:58 +0000 (18:17 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Tue, 8 May 2012 16:17:58 +0000 (18:17 +0200)
- test prints out information that failed socket binding is ok.
- iface_mgr buffers are no longer static.

src/bin/dhcp6/tests/dhcp6_test.py
src/lib/dhcp/iface_mgr.cc

index d63e04d7f0ca25ccf81980ec1bc990e52efb129f..e080c777958821ccca4f69b550e3a421cc33bf0b 100644 (file)
@@ -36,6 +36,9 @@ class TestDhcpv6Daemon(unittest.TestCase):
         # to the main program ASAP in each test... this prevents
         # hangs reading from the child process (as the pipe is only
         # open in the child), and also insures nice pretty output
+        print("Please ignore any socket errors. Purpose of this test is to")
+        print("verify that DHCPv6 process could be started, not that socket")
+        print("could be bound. Binding fails when run as non-root user.")
 
     def tearDown(self):
         # clean up our stdout munging
index 024c0660ac7949adee61daa3811a1460cf7b5d14..210e14970f39d17818ceb10fb3f9730a9e929a8e 100644 (file)
@@ -707,7 +707,7 @@ IfaceMgr::receive4() {
 
     // Now we have a socket, let's get some data from it!
     struct sockaddr_in from_addr;
-    static uint8_t buf[RCVBUFSIZE];
+    uint8_t buf[RCVBUFSIZE];
 
     memset(&control_buf_[0], 0, control_buf_len_);
     memset(&from_addr, 0, sizeof(from_addr));
@@ -772,7 +772,7 @@ IfaceMgr::receive4() {
 }
 
 Pkt6Ptr IfaceMgr::receive6() {
-    static uint8_t buf[RCVBUFSIZE];
+    uint8_t buf[RCVBUFSIZE];
 
     memset(&control_buf_[0], 0, control_buf_len_);
     struct sockaddr_in6 from;