]> git.ipfire.org Git - thirdparty/systemd.git/commit
networkd/dhcp: shorten overlong hostname (#7616)
authorLuca Bruno <luca.bruno@coreos.com>
Wed, 13 Dec 2017 17:00:46 +0000 (17:00 +0000)
committerLennart Poettering <lennart@poettering.net>
Wed, 13 Dec 2017 17:00:46 +0000 (18:00 +0100)
commit2de2abad62d4f23f7d9af0c3871f9955896d085c
treed449365dfbc974b187caf7cac3c493f698bcc4be
parent3ce5a5df2cfb570ee30b86d1dd47f6cea452115a
networkd/dhcp: shorten overlong hostname (#7616)

This commit updates networkd behavior to check if the hostname option
received via DHCP is too long for Linux limit, and in case shorten it.
An overlong hostname will be truncated to the first dot or to
`HOST_MAX_LEN`, whatever comes earlier.
src/basic/hostname-util.c
src/basic/hostname-util.h
src/network/networkd-dhcp4.c
src/network/test-network.c