mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-06 05:38:15 +02:00
systemd: accept encoded domain names without terminating zero label
Backport the following fix from systemd:
30675a6ee9
This fixes NMCI test failure for test "dhcpv6_hostname".
This commit is contained in:
parent
5e3b46411c
commit
4c9af3155b
1 changed files with 5 additions and 2 deletions
|
|
@ -932,9 +932,12 @@ int dns_name_from_wire_format(const uint8_t **data, size_t *len, char **ret) {
|
|||
const char *label;
|
||||
uint8_t c;
|
||||
|
||||
/* Unterminated name */
|
||||
/* RFC 4704 § 4: fully qualified domain names include the terminating
|
||||
* zero-length label, partial names don't. According to the RFC, DHCPv6
|
||||
* servers should always send the fully qualified name, but that's not
|
||||
* true in practice. Also accept partial names. */
|
||||
if (optlen == 0)
|
||||
return -EBADMSG;
|
||||
break;
|
||||
|
||||
/* RFC 1035 § 3.1 total length of encoded name is limited to 255 octets */
|
||||
if (*len - optlen > 255)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue