diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-02-06 07:01:47 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-02-14 06:43:45 +0100 |
commit | 126277aceb389137406eeac7703db1c0a0e355b6 (patch) | |
tree | 9fc472db30214aa0201594954ba6d751a264ca24 /src/libsystemd-network/test-dhcp6-client.c | |
parent | sd-dhcp6-client: unify dhcp6_option_append_{ia,pd}() (diff) | |
download | systemd-126277aceb389137406eeac7703db1c0a0e355b6.tar.xz systemd-126277aceb389137406eeac7703db1c0a0e355b6.zip |
sd-dhcp6-client: always use ENODATA when a lease does not have requested data
Diffstat (limited to 'src/libsystemd-network/test-dhcp6-client.c')
-rw-r--r-- | src/libsystemd-network/test-dhcp6-client.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsystemd-network/test-dhcp6-client.c b/src/libsystemd-network/test-dhcp6-client.c index 53def1b07f..6152a30863 100644 --- a/src/libsystemd-network/test-dhcp6-client.c +++ b/src/libsystemd-network/test-dhcp6-client.c @@ -571,16 +571,16 @@ static void test_advertise_option(sd_event *e) { assert_se(!memcmp(&addr, &msg_advertise[42], sizeof(addr))); assert_se(lt_pref == 150); assert_se(lt_valid == 180); - assert_se(sd_dhcp6_lease_get_address(lease, &addr, <_pref, <_valid) == -ENOMSG); + assert_se(sd_dhcp6_lease_get_address(lease, &addr, <_pref, <_valid) == -ENODATA); sd_dhcp6_lease_reset_address_iter(lease); assert_se(sd_dhcp6_lease_get_address(lease, &addr, <_pref, <_valid) >= 0); assert_se(!memcmp(&addr, &msg_advertise[42], sizeof(addr))); - assert_se(sd_dhcp6_lease_get_address(lease, &addr, <_pref, <_valid) == -ENOMSG); + assert_se(sd_dhcp6_lease_get_address(lease, &addr, <_pref, <_valid) == -ENODATA); sd_dhcp6_lease_reset_address_iter(lease); assert_se(sd_dhcp6_lease_get_address(lease, &addr, <_pref, <_valid) >= 0); assert_se(!memcmp(&addr, &msg_advertise[42], sizeof(addr))); - assert_se(sd_dhcp6_lease_get_address(lease, &addr, <_pref, <_valid) == -ENOMSG); + assert_se(sd_dhcp6_lease_get_address(lease, &addr, <_pref, <_valid) == -ENODATA); assert_se(dhcp6_lease_get_serverid(lease, &opt, &len) >= 0); assert_se(len == 14); @@ -735,7 +735,7 @@ static void test_client_verify_request(DHCP6Message *request, size_t len) { assert_se(found_clientid && found_iana && found_serverid && found_elapsed_time); sd_dhcp6_lease_reset_address_iter(lease); - assert_se(sd_dhcp6_lease_get_address(lease, &addr, <_pref, <_valid) == -ENOMSG); + assert_se(sd_dhcp6_lease_get_address(lease, &addr, <_pref, <_valid) == -ENODATA); } static void test_client_send_advertise(DHCP6Message *solicit) { @@ -910,7 +910,7 @@ static void test_client_verify_information_request(DHCP6Message *information_req sd_dhcp6_lease_reset_address_iter(lease); - assert_se(sd_dhcp6_lease_get_address(lease, &addr, <_pref, <_valid) == -ENOMSG); + assert_se(sd_dhcp6_lease_get_address(lease, &addr, <_pref, <_valid) == -ENODATA); } int dhcp6_network_send_udp_socket(int s, struct in6_addr *server_address, |