summaryrefslogtreecommitdiff
path: root/src/network/networkd-dhcp6.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/networkd-dhcp6.c')
-rw-r--r--src/network/networkd-dhcp6.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
index e572ad4595..0023c51b86 100644
--- a/src/network/networkd-dhcp6.c
+++ b/src/network/networkd-dhcp6.c
@@ -83,8 +83,8 @@ static int dhcp6_address_change(Link *link, struct in6_addr *ip6_addr,
addr->cinfo.ifa_valid = lifetime_valid;
log_link_info(link,
- "DHCPv6 address "SD_ICMP6_ND_ADDRESS_FORMAT_STR"/%d timeout preferred %d valid %d",
- SD_ICMP6_ND_ADDRESS_FORMAT_VAL(addr->in_addr.in6),
+ "DHCPv6 address "SD_NDISC_ADDRESS_FORMAT_STR"/%d timeout preferred %d valid %d",
+ SD_NDISC_ADDRESS_FORMAT_VAL(addr->in_addr.in6),
addr->prefixlen, lifetime_preferred, lifetime_valid);
r = address_configure(addr, link, dhcp6_address_handler, true);
@@ -111,7 +111,7 @@ static int dhcp6_lease_address_acquired(sd_dhcp6_client *client, Link *link) {
&lifetime_preferred,
&lifetime_valid) >= 0) {
- r = sd_icmp6_ra_get_prefixlen(link->icmp6_router_discovery,
+ r = sd_ndisc_get_prefixlen(link->icmp6_router_discovery,
&ip6_addr, &prefixlen);
if (r < 0 && r != -EADDRNOTAVAIL) {
log_link_warning_errno(link, r, "Could not get prefix information: %m");
@@ -184,9 +184,9 @@ static int dhcp6_configure(Link *link, int event) {
bool information_request;
assert_return(link, -EINVAL);
- assert_return(IN_SET(event, SD_ICMP6_ND_EVENT_ROUTER_ADVERTISMENT_TIMEOUT,
- SD_ICMP6_ND_EVENT_ROUTER_ADVERTISMENT_OTHER,
- SD_ICMP6_ND_EVENT_ROUTER_ADVERTISMENT_MANAGED), -EINVAL);
+ assert_return(IN_SET(event, SD_NDISC_EVENT_ROUTER_ADVERTISMENT_TIMEOUT,
+ SD_NDISC_EVENT_ROUTER_ADVERTISMENT_OTHER,
+ SD_NDISC_EVENT_ROUTER_ADVERTISMENT_MANAGED), -EINVAL);
link->dhcp6_configured = false;
@@ -198,7 +198,7 @@ static int dhcp6_configure(Link *link, int event) {
goto error;
}
- if (information_request && event != SD_ICMP6_ND_EVENT_ROUTER_ADVERTISMENT_OTHER) {
+ if (information_request && event != SD_NDISC_EVENT_ROUTER_ADVERTISMENT_OTHER) {
r = sd_dhcp6_client_stop(link->dhcp6_client);
if (r < 0) {
log_link_warning_errno(link, r, "Could not stop DHCPv6 while setting Managed mode: %m");
@@ -249,7 +249,7 @@ static int dhcp6_configure(Link *link, int event) {
if (r < 0)
goto error;
- if (event == SD_ICMP6_ND_EVENT_ROUTER_ADVERTISMENT_OTHER) {
+ if (event == SD_NDISC_EVENT_ROUTER_ADVERTISMENT_OTHER) {
r = sd_dhcp6_client_set_information_request(link->dhcp6_client,
true);
if (r < 0)
@@ -274,7 +274,7 @@ static int dhcp6_prefix_expired(Link *link) {
uint8_t expired_prefixlen;
uint32_t lifetime_preferred, lifetime_valid;
- r = sd_icmp6_ra_get_expired_prefix(link->icmp6_router_discovery,
+ r = sd_ndisc_get_expired_prefix(link->icmp6_router_discovery,
&expired_prefix, &expired_prefixlen);
if (r < 0)
return r;
@@ -283,8 +283,8 @@ static int dhcp6_prefix_expired(Link *link) {
if (r < 0)
return r;
- log_link_info(link, "IPv6 prefix "SD_ICMP6_ND_ADDRESS_FORMAT_STR"/%d expired",
- SD_ICMP6_ND_ADDRESS_FORMAT_VAL(*expired_prefix),
+ log_link_info(link, "IPv6 prefix "SD_NDISC_ADDRESS_FORMAT_STR"/%d expired",
+ SD_NDISC_ADDRESS_FORMAT_VAL(*expired_prefix),
expired_prefixlen);
sd_dhcp6_lease_reset_address_iter(lease);
@@ -293,12 +293,12 @@ static int dhcp6_prefix_expired(Link *link) {
&lifetime_preferred,
&lifetime_valid) >= 0) {
- r = sd_icmp6_prefix_match(expired_prefix, expired_prefixlen,
+ r = sd_ndisc_prefix_match(expired_prefix, expired_prefixlen,
&ip6_addr);
if (r < 0)
continue;
- log_link_info(link, "IPv6 prefix length updated "SD_ICMP6_ND_ADDRESS_FORMAT_STR"/%d", SD_ICMP6_ND_ADDRESS_FORMAT_VAL(ip6_addr), 128);
+ log_link_info(link, "IPv6 prefix length updated "SD_NDISC_ADDRESS_FORMAT_STR"/%d", SD_NDISC_ADDRESS_FORMAT_VAL(ip6_addr), 128);
dhcp6_address_change(link, &ip6_addr, 128, lifetime_preferred, lifetime_valid);
}
@@ -306,7 +306,7 @@ static int dhcp6_prefix_expired(Link *link) {
return 0;
}
-static void icmp6_router_handler(sd_icmp6_nd *nd, int event, void *userdata) {
+static void icmp6_router_handler(sd_ndisc *nd, int event, void *userdata) {
Link *link = userdata;
assert(link);
@@ -317,17 +317,17 @@ static void icmp6_router_handler(sd_icmp6_nd *nd, int event, void *userdata) {
return;
switch(event) {
- case SD_ICMP6_ND_EVENT_ROUTER_ADVERTISMENT_NONE:
+ case SD_NDISC_EVENT_ROUTER_ADVERTISMENT_NONE:
return;
- case SD_ICMP6_ND_EVENT_ROUTER_ADVERTISMENT_TIMEOUT:
- case SD_ICMP6_ND_EVENT_ROUTER_ADVERTISMENT_OTHER:
- case SD_ICMP6_ND_EVENT_ROUTER_ADVERTISMENT_MANAGED:
+ case SD_NDISC_EVENT_ROUTER_ADVERTISMENT_TIMEOUT:
+ case SD_NDISC_EVENT_ROUTER_ADVERTISMENT_OTHER:
+ case SD_NDISC_EVENT_ROUTER_ADVERTISMENT_MANAGED:
dhcp6_configure(link, event);
break;
- case SD_ICMP6_ND_EVENT_ROUTER_ADVERTISMENT_PREFIX_EXPIRED:
+ case SD_NDISC_EVENT_ROUTER_ADVERTISMENT_PREFIX_EXPIRED:
if (!link->rtnl_extended_attrs)
dhcp6_prefix_expired(link);
@@ -349,23 +349,23 @@ int icmp6_configure(Link *link) {
assert_return(link, -EINVAL);
- r = sd_icmp6_nd_new(&link->icmp6_router_discovery);
+ r = sd_ndisc_new(&link->icmp6_router_discovery);
if (r < 0)
return r;
- r = sd_icmp6_nd_attach_event(link->icmp6_router_discovery, NULL, 0);
+ r = sd_ndisc_attach_event(link->icmp6_router_discovery, NULL, 0);
if (r < 0)
return r;
- r = sd_icmp6_nd_set_mac(link->icmp6_router_discovery, &link->mac);
+ r = sd_ndisc_set_mac(link->icmp6_router_discovery, &link->mac);
if (r < 0)
return r;
- r = sd_icmp6_nd_set_index(link->icmp6_router_discovery, link->ifindex);
+ r = sd_ndisc_set_index(link->icmp6_router_discovery, link->ifindex);
if (r < 0)
return r;
- r = sd_icmp6_nd_set_callback(link->icmp6_router_discovery,
+ r = sd_ndisc_set_callback(link->icmp6_router_discovery,
icmp6_router_handler, link);
return r;