mirror of
https://github.com/systemd/systemd.git
synced 2025-03-31 14:50:15 +03:00
network: dhcp6: rename variables
This commit is contained in:
parent
78e50edfd4
commit
df8bf72631
@ -1556,10 +1556,12 @@ static int dhcp6_configure(Link *link) {
|
||||
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);
|
||||
@ -1672,7 +1674,7 @@ int link_serialize_dhcp6_client(Link *link, FILE *f) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_dhcp6_pd_hint(
|
||||
int config_parse_dhcp6_pd_prefix_hint(
|
||||
const char* unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@ -1684,7 +1686,7 @@ int config_parse_dhcp6_pd_hint(
|
||||
void *data,
|
||||
void *userdata) {
|
||||
|
||||
Network *network = data;
|
||||
Network *network = userdata;
|
||||
union in_addr_union u;
|
||||
unsigned char prefixlen;
|
||||
int r;
|
||||
@ -1692,7 +1694,7 @@ int config_parse_dhcp6_pd_hint(
|
||||
assert(filename);
|
||||
assert(lvalue);
|
||||
assert(rvalue);
|
||||
assert(data);
|
||||
assert(userdata);
|
||||
|
||||
r = in_addr_prefix_from_string(rvalue, AF_INET6, &u, &prefixlen);
|
||||
if (r < 0) {
|
||||
@ -1707,8 +1709,8 @@ int config_parse_dhcp6_pd_hint(
|
||||
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;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ int link_request_dhcp6_client(Link *link);
|
||||
|
||||
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);
|
||||
|
@ -248,7 +248,7 @@ DHCPv6.UserClass, config_parse_dhcp_user_or_vendor_cl
|
||||
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
|
||||
|
@ -183,11 +183,11 @@ struct Network {
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user