aboutsummaryrefslogtreecommitdiff
path: root/sbin/dumpon
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2018-11-20 18:10:56 +0000
committerMark Johnston <markj@FreeBSD.org>2018-11-20 18:10:56 +0000
commit79dd8f690a418f9b25cfedbbb075640347e8fbd7 (patch)
tree85e60514e78294325f06409383f4cb79b12b017a /sbin/dumpon
parent02c4bf4391ec7296f5a002c139576ae8797853d1 (diff)
downloadsrc-79dd8f690a418f9b25cfedbbb075640347e8fbd7.tar.gz
src-79dd8f690a418f9b25cfedbbb075640347e8fbd7.zip
Avoid clobbering a user-specified -g value after r340547.
CID: 1396919 MFC with: r340547
Notes
Notes: svn path=/head/; revision=340686
Diffstat (limited to 'sbin/dumpon')
-rw-r--r--sbin/dumpon/dumpon.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sbin/dumpon/dumpon.c b/sbin/dumpon/dumpon.c
index bafeae171d0e..c9805c47d14c 100644
--- a/sbin/dumpon/dumpon.c
+++ b/sbin/dumpon/dumpon.c
@@ -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);