diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-05-14 09:52:42 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-05-18 13:19:37 +0200 |
commit | c9f2db2c408d728f1a21f6951a8115470504bd0b (patch) | |
tree | 0a229e323b968531bc2059ab50a5a3417ca008cd /src/network/networkd-dhcp6.c | |
parent | conf-parser: introduce config_parse_in_addr_non_null() (diff) | |
download | systemd-c9f2db2c408d728f1a21f6951a8115470504bd0b.tar.xz systemd-c9f2db2c408d728f1a21f6951a8115470504bd0b.zip |
network: use config_parse_in_addr_non_null()
Diffstat (limited to 'src/network/networkd-dhcp6.c')
-rw-r--r-- | src/network/networkd-dhcp6.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c index 7061afe0a2..e8c7d8ebd8 100644 --- a/src/network/networkd-dhcp6.c +++ b/src/network/networkd-dhcp6.c @@ -1888,47 +1888,3 @@ int config_parse_dhcp6_pd_subnet_id( return 0; } - -int config_parse_dhcp6_pd_token( - const char *unit, - const char *filename, - unsigned line, - const char *section, - unsigned section_line, - const char *lvalue, - int ltype, - const char *rvalue, - void *data, - void *userdata) { - - struct in6_addr *addr = data; - union in_addr_union tmp; - int r; - - assert(filename); - assert(lvalue); - assert(rvalue); - assert(data); - - if (isempty(rvalue)) { - *addr = (struct in6_addr) {}; - return 0; - } - - r = in_addr_from_string(AF_INET6, rvalue, &tmp); - if (r < 0) { - log_syntax(unit, LOG_WARNING, filename, line, r, - "Failed to parse DHCPv6 Prefix Delegation token, ignoring: %s", rvalue); - return 0; - } - - if (in_addr_is_null(AF_INET6, &tmp)) { - log_syntax(unit, LOG_WARNING, filename, line, 0, - "DHCPv6 Prefix Delegation token cannot be the ANY address, ignoring: %s", rvalue); - return 0; - } - - *addr = tmp.in6; - - return 0; -} |