network: accept NUL character in SendOption=

Closes #14609.
This commit is contained in:
Yu Watanabe 2020-01-27 18:11:08 +09:00
parent a6a36dea2d
commit 732e3a6104
1 changed files with 1 additions and 1 deletions

View File

@ -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);