|
9 | 9 |
|
10 | 10 | #include "sd-dhcp6-client.h" |
11 | 11 |
|
12 | | -#include "escape.h" |
13 | 12 | #include "hashmap.h" |
14 | 13 | #include "hostname-setup.h" |
15 | 14 | #include "hostname-util.h" |
|
24 | 23 | #include "string-table.h" |
25 | 24 | #include "string-util.h" |
26 | 25 | #include "radv-internal.h" |
27 | | -#include "web-util.h" |
28 | 26 |
|
29 | 27 | bool link_dhcp6_with_address_enabled(Link *link) { |
30 | 28 | if (!link_dhcp6_enabled(link)) |
@@ -1812,33 +1810,12 @@ int config_parse_dhcp6_mud_url( |
1812 | 1810 | void *data, |
1813 | 1811 | void *userdata) { |
1814 | 1812 |
|
1815 | | - _cleanup_free_ char *unescaped = NULL; |
1816 | 1813 | Network *network = data; |
1817 | | - ssize_t l; |
1818 | 1814 |
|
1819 | | - assert(filename); |
1820 | | - assert(lvalue); |
1821 | | - assert(rvalue); |
1822 | | - |
1823 | | - if (isempty(rvalue)) { |
1824 | | - network->dhcp6_mudurl = mfree(network->dhcp6_mudurl); |
1825 | | - return 0; |
1826 | | - } |
1827 | | - |
1828 | | - l = cunescape(rvalue, 0, &unescaped); |
1829 | | - if (l < 0) { |
1830 | | - log_syntax(unit, LOG_WARNING, filename, line, l, |
1831 | | - "Failed to Failed to unescape MUD URL, ignoring: %s", rvalue); |
1832 | | - return 0; |
1833 | | - } |
1834 | | - |
1835 | | - if (!http_url_is_valid(unescaped) || strlen(unescaped) > UINT8_MAX) { |
1836 | | - log_syntax(unit, LOG_WARNING, filename, line, 0, |
1837 | | - "Failed to parse MUD URL '%s', ignoring: %m", rvalue); |
1838 | | - return 0; |
1839 | | - } |
| 1815 | + assert(network); |
1840 | 1816 |
|
1841 | | - return free_and_replace(network->dhcp6_mudurl, unescaped); |
| 1817 | + return config_parse_mud_url(unit, filename, line, section, section_line, lvalue, ltype, rvalue, |
| 1818 | + &network->dhcp6_mudurl); |
1842 | 1819 | } |
1843 | 1820 |
|
1844 | 1821 | DEFINE_CONFIG_PARSE_ENUM(config_parse_dhcp6_client_start_mode, dhcp6_client_start_mode, DHCP6ClientStartMode, |
|
0 commit comments