summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/test-dhcp-server.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-08-04 20:57:02 +0200
committerTom Gundersen <teg@jklm.no>2014-08-04 20:58:15 +0200
commit59b8f6b628145586e87b8a4f6e29c755ad7d61ed (patch)
tree77817ab759626160a4a9842c6cddff2b5ed38996 /src/libsystemd-network/test-dhcp-server.c
parent72d314c8d80f0816afce6ba72cd27ec7ff1c73c1 (diff)
sd-dhcp-server: always send out ROUTER and SUBNET_MASK
For now we simply take these values from the server's address.
Diffstat (limited to 'src/libsystemd-network/test-dhcp-server.c')
-rw-r--r--src/libsystemd-network/test-dhcp-server.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libsystemd-network/test-dhcp-server.c b/src/libsystemd-network/test-dhcp-server.c
index a9bdb9ab8b..a94b62f8e6 100644
--- a/src/libsystemd-network/test-dhcp-server.c
+++ b/src/libsystemd-network/test-dhcp-server.c
@@ -56,9 +56,10 @@ static int test_basic(sd_event *event) {
assert_se(!sd_dhcp_server_unref(server));
assert_se(sd_dhcp_server_start(server) == -EUNATCH);
- assert_se(sd_dhcp_server_set_address(server, &address_any) == -EINVAL);
- assert_se(sd_dhcp_server_set_address(server, &address_lo) >= 0);
- assert_se(sd_dhcp_server_set_address(server, &address_lo) == -EBUSY);
+ assert_se(sd_dhcp_server_set_address(server, &address_any, 28) == -EINVAL);
+ assert_se(sd_dhcp_server_set_address(server, &address_any, 38) == -ERANGE);
+ assert_se(sd_dhcp_server_set_address(server, &address_lo, 8) >= 0);
+ assert_se(sd_dhcp_server_set_address(server, &address_lo, 8) == -EBUSY);
assert_se(sd_dhcp_server_set_lease_pool(server, &address_any, 1) == -EINVAL);
assert_se(sd_dhcp_server_set_lease_pool(server, &address_lo, 0) == -EINVAL);
@@ -120,7 +121,7 @@ static void test_message_handler(void) {
};
assert_se(sd_dhcp_server_new(&server, 1) >= 0);
- assert_se(sd_dhcp_server_set_address(server, &address_lo) >= 0);
+ assert_se(sd_dhcp_server_set_address(server, &address_lo, 8) >= 0);
assert_se(sd_dhcp_server_attach_event(server, NULL, 0) >= 0);
assert_se(sd_dhcp_server_start(server) >= 0);