aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlrich Dangel <uli@spamt.net>2011-06-08 22:53:50 +0200
committermaximilian attems <max@stro.at>2011-07-06 20:45:25 +0200
commit774aa24ad70de9b4897131742069b68f1ccb6a65 (patch)
treec48ee9e24ca124b014de6e9c06aeb7b877f02f83
parent377dd4e8c660dd3350efcc4144019cd100e5ad3a (diff)
downloadklibc-774aa24ad70de9b4897131742069b68f1ccb6a65.tar.gz
[klibc] ipconfig: Don't try to guess the nameserver
klibcs ipconfig tries to guess the nameserver if no nameserver is provided. This may happen due to misconfigured dhcp or the use of the ip= parameter. This patch removes the guessing from ipconfig as it is not possible for any other script to determine if the provided nameserver is valid or a guessed one. If the old behavior is really needed this could be easily implemented in an external script. Analysis shows that ip_nameserver is unused outside of ipconfig, nor any sign of gethostbyname() or such. mount.c doesn't do dns resolving, so I'd guess your patch is a welcome fix. I haven't seen this guessing in linux >= 2.0. Closes: #594638 Signed-off-by: Ulrich Dangel <uli@spamt.net> Reviewed-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: maximilian attems <max@stro.at>
-rw-r--r--usr/kinit/ipconfig/main.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/usr/kinit/ipconfig/main.c b/usr/kinit/ipconfig/main.c
index 6ad5588af57ac..8dc6cbe736d21 100644
--- a/usr/kinit/ipconfig/main.c
+++ b/usr/kinit/ipconfig/main.c
@@ -176,11 +176,6 @@ static void postprocess_device(struct netdev *dev)
printf("IP-Config: %s guessed broadcast address %s\n",
dev->name, my_inet_ntoa(dev->ip_broadcast));
}
- if (dev->ip_nameserver[0] == INADDR_ANY) {
- dev->ip_nameserver[0] = dev->ip_server;
- printf("IP-Config: %s guessed nameserver address %s\n",
- dev->name, my_inet_ntoa(dev->ip_nameserver[0]));
- }
}
static void complete_device(struct netdev *dev)