summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-01-04 16:14:28 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-04 16:14:30 +0100
commit78b1d0fa1ec8f6283e514d4d68ad08fc0f16a578 (patch)
tree41ac7d6a557a653d24b04639a9bc6913d8e781bc
parent596e6a36bc0bd73a5dc81341f64c71a892fc09fa (diff)
downloadbarebox-78b1d0fa1ec8f6283e514d4d68ad08fc0f16a578.tar.gz
barebox-78b1d0fa1ec8f6283e514d4d68ad08fc0f16a578.tar.xz
net: ip_route_get: resolv hostnames
When global.net.server is a hostname instead of an IP address we have to resolv it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--commands/ip-route-get.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/ip-route-get.c b/commands/ip-route-get.c
index b3d4ecce82..d3c15b7798 100644
--- a/commands/ip-route-get.c
+++ b/commands/ip-route-get.c
@@ -40,7 +40,7 @@ static int do_ip_route_get(int argc, char *argv[])
if (argc == optind + 2)
variable = argv[optind + 1];
- ret = string_to_ip(argv[optind], &ip);
+ ret = resolv(argv[optind], &ip);
if (ret) {
printf("Cannot convert \"%s\" into a IP address: %s\n",
argv[optind], strerror(-ret));