2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 22:15:23 +00:00

[1540] Changes after review:

- test prints out information that failed socket binding is ok.
- iface_mgr buffers are no longer static.
This commit is contained in:
Tomek Mrugalski
2012-05-08 18:17:58 +02:00
parent 9f613bb9c9
commit be560f4516
2 changed files with 5 additions and 2 deletions

View File

@@ -36,6 +36,9 @@ class TestDhcpv6Daemon(unittest.TestCase):
# to the main program ASAP in each test... this prevents # to the main program ASAP in each test... this prevents
# hangs reading from the child process (as the pipe is only # hangs reading from the child process (as the pipe is only
# open in the child), and also insures nice pretty output # 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): def tearDown(self):
# clean up our stdout munging # clean up our stdout munging

View File

@@ -707,7 +707,7 @@ IfaceMgr::receive4() {
// Now we have a socket, let's get some data from it! // Now we have a socket, let's get some data from it!
struct sockaddr_in from_addr; struct sockaddr_in from_addr;
static uint8_t buf[RCVBUFSIZE]; uint8_t buf[RCVBUFSIZE];
memset(&control_buf_[0], 0, control_buf_len_); memset(&control_buf_[0], 0, control_buf_len_);
memset(&from_addr, 0, sizeof(from_addr)); memset(&from_addr, 0, sizeof(from_addr));
@@ -772,7 +772,7 @@ IfaceMgr::receive4() {
} }
Pkt6Ptr IfaceMgr::receive6() { Pkt6Ptr IfaceMgr::receive6() {
static uint8_t buf[RCVBUFSIZE]; uint8_t buf[RCVBUFSIZE];
memset(&control_buf_[0], 0, control_buf_len_); memset(&control_buf_[0], 0, control_buf_len_);
struct sockaddr_in6 from; struct sockaddr_in6 from;