Avoid clobbering a user-specified -g value after r340547.

CID:		1396919
MFC with:	r340547
This commit is contained in:
Mark Johnston 2018-11-20 18:10:56 +00:00
parent 02c4bf4391
commit 79dd8f690a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=340686

View file

@ -475,12 +475,15 @@ main(int argc, char *argv[])
if (inet_aton(client, &ndconf.ndc_client) == 0)
errx(EX_USAGE, "invalid client address '%s'", client);
gateway = find_gateway(argv[0]);
if (gateway == NULL) {
if (verbose)
printf("failed to look up gateway for %s\n",
server);
gateway = server;
gateway = find_gateway(argv[0]);
if (gateway == NULL) {
if (verbose)
printf(
"failed to look up gateway for %s\n",
server);
gateway = server;
}
}
if (inet_aton(gateway, &ndconf.ndc_gateway) == 0)
errx(EX_USAGE, "invalid gateway address '%s'", gateway);