]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipconfig: Don't override command-line hostnames or domains
authorJosh Triplett <josh@joshtriplett.org>
Wed, 2 Jun 2021 01:38:41 +0000 (18:38 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Jun 2021 20:27:03 +0000 (13:27 -0700)
commit3289e5a10e663ef23b806c07dc2c52827288530e
treecc34cd01c5f7c13661b418a51240750e11cbc049
parent065763e155e3791e787e59fe6c6daf6a6d1f9a67
net: ipconfig: Don't override command-line hostnames or domains

If the user specifies a hostname or domain name as part of the ip=
command-line option, preserve it and don't overwrite it with one
supplied by DHCP/BOOTP.

For instance, ip=::::myhostname::dhcp will use "myhostname" rather than
ignoring and overwriting it.

Fix the comment on ic_bootp_string that suggests it only copies a string
"if not already set"; it doesn't have any such logic.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ipconfig.c