]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: accept NUL character in SendOption= 14675/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 27 Jan 2020 09:11:08 +0000 (18:11 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 27 Jan 2020 10:58:10 +0000 (19:58 +0900)
Closes #14609.

src/network/networkd-dhcp-common.c

index 6465a8cfe9c77e7e30d6a84faa83baee1da34057..8664d8cdc0d43782def4aa85ac2f7060e7c7ab6e 100644 (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);