return log_link_debug_errno(link, r, "DHCPv6 CLIENT: Failed to set prefix delegation: %m");
}
- if (link->network->dhcp6_pd_length > 0) {
- r = sd_dhcp6_client_set_prefix_delegation_hint(client, link->network->dhcp6_pd_length, &link->network->dhcp6_pd_address);
+ if (link->network->dhcp6_pd_prefix_length > 0) {
+ r = sd_dhcp6_client_set_prefix_delegation_hint(client,
+ link->network->dhcp6_pd_prefix_length,
+ &link->network->dhcp6_pd_prefix_hint);
if (r < 0)
- return log_link_debug_errno(link, r, "DHCPv6 CLIENT: Failed to set prefix hint: %m");
+ return log_link_debug_errno(link, r, "DHCPv6 CLIENT: Failed to set prefix delegation hint: %m");
}
link->dhcp6_client = TAKE_PTR(client);
return 0;
}
-int config_parse_dhcp6_pd_hint(
+int config_parse_dhcp6_pd_prefix_hint(
const char* unit,
const char *filename,
unsigned line,
void *data,
void *userdata) {
- Network *network = data;
+ Network *network = userdata;
union in_addr_union u;
unsigned char prefixlen;
int r;
assert(filename);
assert(lvalue);
assert(rvalue);
- assert(data);
+ assert(userdata);
r = in_addr_prefix_from_string(rvalue, AF_INET6, &u, &prefixlen);
if (r < 0) {
return 0;
}
- network->dhcp6_pd_address = u.in6;
- network->dhcp6_pd_length = prefixlen;
+ network->dhcp6_pd_prefix_hint = u.in6;
+ network->dhcp6_pd_prefix_length = prefixlen;
return 0;
}
int link_serialize_dhcp6_client(Link *link, FILE *f);
-CONFIG_PARSER_PROTOTYPE(config_parse_dhcp6_pd_hint);
+CONFIG_PARSER_PROTOTYPE(config_parse_dhcp6_pd_prefix_hint);
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp6_mud_url);
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp6_client_start_mode);
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp6_pd_subnet_id);
DHCPv6.VendorClass, config_parse_dhcp_user_or_vendor_class, AF_INET6, offsetof(Network, dhcp6_vendor_class)
DHCPv6.SendVendorOption, config_parse_dhcp_send_option, AF_INET6, offsetof(Network, dhcp6_client_send_vendor_options)
DHCPv6.ForceDHCPv6PDOtherInformation, config_parse_bool, 0, offsetof(Network, dhcp6_force_pd_other_information)
-DHCPv6.PrefixDelegationHint, config_parse_dhcp6_pd_hint, 0, 0
+DHCPv6.PrefixDelegationHint, config_parse_dhcp6_pd_prefix_hint, 0, 0
DHCPv6.WithoutRA, config_parse_dhcp6_client_start_mode, 0, offsetof(Network, dhcp6_without_ra)
DHCPv6.SendOption, config_parse_dhcp_send_option, AF_INET6, offsetof(Network, dhcp6_client_send_options)
DHCPv6.IAID, config_parse_iaid, AF_INET6, 0
bool dhcp6_iaid_set;
bool dhcp6_iaid_set_explicitly;
DUID dhcp6_duid;
- uint8_t dhcp6_pd_length;
+ uint8_t dhcp6_pd_prefix_length;
+ struct in6_addr dhcp6_pd_prefix_hint;
char *dhcp6_mudurl;
char **dhcp6_user_class;
char **dhcp6_vendor_class;
- struct in6_addr dhcp6_pd_address;
DHCP6ClientStartMode dhcp6_without_ra;
OrderedHashmap *dhcp6_client_send_options;
OrderedHashmap *dhcp6_client_send_vendor_options;