summaryrefslogtreecommitdiffstats
path: root/src/libsystemd-network/dhcp-option.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-03-11 17:47:17 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-03-11 17:57:17 +0100
commit5a2f378362f2b16f8d837aec4c44532eed737a03 (patch)
treeb38ce49ac8624416ae7d929ce0ae73f8632273a9 /src/libsystemd-network/dhcp-option.h
parentdhcp-option: refuse control and non-UTF8 characters in string option (diff)
downloadsystemd-5a2f378362f2b16f8d837aec4c44532eed737a03.tar.xz
systemd-5a2f378362f2b16f8d837aec4c44532eed737a03.zip
sd-dhcp-server: refuse invalid hostname in request
Currently, the received hostname is not used for assigning an address to the host, or options in the subsequent reply message. But, the parsed hostname is exposed through DBus, and possibly Varlink in the future. Let's ignore spurious hostname.
Diffstat (limited to 'src/libsystemd-network/dhcp-option.h')
-rw-r--r--src/libsystemd-network/dhcp-option.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsystemd-network/dhcp-option.h b/src/libsystemd-network/dhcp-option.h
index 425f5b5016..aaa8f847b1 100644
--- a/src/libsystemd-network/dhcp-option.h
+++ b/src/libsystemd-network/dhcp-option.h
@@ -44,3 +44,4 @@ int dhcp_option_parse(
char **ret_error_message);
int dhcp_option_parse_string(const uint8_t *option, size_t len, char **ret);
+int dhcp_option_parse_hostname(const uint8_t *option, size_t len, char **ret);