summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-dhcp-common.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-01-27 10:11:08 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-01-27 11:58:10 +0100
commit732e3a61043b970d1d55be0e3593313e412093e9 (patch)
treeed7802e772313051a9c0bcac2ac44a9fd4710ad6 /src/network/networkd-dhcp-common.c
parenttest: add tests for UNESCAPE_ACCEPT_NUL (diff)
downloadsystemd-732e3a61043b970d1d55be0e3593313e412093e9.tar.xz
systemd-732e3a61043b970d1d55be0e3593313e412093e9.zip
network: accept NUL character in SendOption=
Closes #14609.
Diffstat (limited to '')
-rw-r--r--src/network/networkd-dhcp-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c
index 6465a8cfe9..8664d8cdc0 100644
--- a/src/network/networkd-dhcp-common.c
+++ b/src/network/networkd-dhcp-common.c
@@ -390,7 +390,7 @@ int config_parse_dhcp_send_option(
break;
}
case DHCP_OPTION_DATA_STRING:
- sz = cunescape(p, 0, &q);
+ sz = cunescape(p, UNESCAPE_ACCEPT_NUL, &q);
if (sz < 0) {
log_syntax(unit, LOG_ERR, filename, line, sz,
"Failed to decode DHCPv4 option data, ignoring assignment: %s", p);