1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-10 01:17:44 +03:00

sd-dhcp6-client: rename dhcp6_lease_set_dns() -> dhcp6_lease_add_dns()

As it is allowed that multiple DNS server options appear in the message.
This commit is contained in:
Yu Watanabe 2021-09-24 21:03:24 +09:00
parent e693e96961
commit e210f027e0
4 changed files with 4 additions and 5 deletions

View File

@ -50,7 +50,7 @@ int dhcp6_lease_get_rapid_commit(sd_dhcp6_lease *lease, bool *rapid_commit);
int dhcp6_lease_get_iaid(sd_dhcp6_lease *lease, be32_t *iaid);
int dhcp6_lease_get_pd_iaid(sd_dhcp6_lease *lease, be32_t *iaid);
int dhcp6_lease_set_dns(sd_dhcp6_lease *lease, const uint8_t *optval, size_t optlen);
int dhcp6_lease_add_dns(sd_dhcp6_lease *lease, const uint8_t *optval, size_t optlen);
int dhcp6_lease_add_domains(sd_dhcp6_lease *lease, const uint8_t *optval, size_t optlen);
int dhcp6_lease_add_ntp(sd_dhcp6_lease *lease, const uint8_t *optval, size_t optlen);
int dhcp6_lease_add_sntp(sd_dhcp6_lease *lease, const uint8_t *optval, size_t optlen) ;

View File

@ -1243,7 +1243,7 @@ static int client_parse_message(
break;
case SD_DHCP6_OPTION_DNS_SERVERS:
r = dhcp6_lease_set_dns(lease, optval, optlen);
r = dhcp6_lease_add_dns(lease, optval, optlen);
if (r < 0)
return r;

View File

@ -193,7 +193,7 @@ void sd_dhcp6_lease_reset_pd_prefix_iter(sd_dhcp6_lease *lease) {
lease->prefix_iter = lease->pd.addresses;
}
int dhcp6_lease_set_dns(sd_dhcp6_lease *lease, const uint8_t *optval, size_t optlen) {
int dhcp6_lease_add_dns(sd_dhcp6_lease *lease, const uint8_t *optval, size_t optlen) {
assert_return(lease, -EINVAL);
assert_return(optval, -EINVAL);

View File

@ -510,8 +510,7 @@ static int test_advertise_option(sd_event *e) {
case SD_DHCP6_OPTION_DNS_SERVERS:
assert_se(optlen == 16);
assert_se(dhcp6_lease_set_dns(lease, optval,
optlen) >= 0);
assert_se(dhcp6_lease_add_dns(lease, optval, optlen) >= 0);
break;
case SD_DHCP6_OPTION_DOMAIN_LIST: