diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-11-01 02:31:31 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-11-01 10:22:49 +0100 |
commit | ef4edc1546ef1470e0a64a618a095dd2734a0d93 (patch) | |
tree | 92436139d0ad9aa248ceb5fcdd21e5e3263bfc86 /src/libsystemd-network/sd-dhcp6-lease.c | |
parent | execute: respect selinux_context_ignore (diff) | |
download | systemd-ef4edc1546ef1470e0a64a618a095dd2734a0d93.tar.xz systemd-ef4edc1546ef1470e0a64a618a095dd2734a0d93.zip |
sd-dhcp6-client: introduce sd_dhcp6_lease_get_server_address()
Diffstat (limited to 'src/libsystemd-network/sd-dhcp6-lease.c')
-rw-r--r-- | src/libsystemd-network/sd-dhcp6-lease.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libsystemd-network/sd-dhcp6-lease.c b/src/libsystemd-network/sd-dhcp6-lease.c index 6c7ffc7999..7e433c4efa 100644 --- a/src/libsystemd-network/sd-dhcp6-lease.c +++ b/src/libsystemd-network/sd-dhcp6-lease.c @@ -24,6 +24,14 @@ int sd_dhcp6_lease_get_timestamp(sd_dhcp6_lease *lease, clockid_t clock, uint64_ return 0; } +int sd_dhcp6_lease_get_server_address(sd_dhcp6_lease *lease, struct in6_addr *ret) { + assert_return(lease, -EINVAL); + assert_return(ret, -EINVAL); + + *ret = lease->server_address; + return 0; +} + int dhcp6_lease_ia_rebind_expire(const DHCP6IA *ia, uint32_t *expire) { DHCP6Address *addr; uint32_t valid = 0, t; |