diff options
author | 2020-04-28 15:55:55 +0000 | |
---|---|---|
committer | 2020-04-28 15:55:55 +0000 | |
commit | a4b6a136706727dfb4b03203fdd5a81440fedbca (patch) | |
tree | 5412b71164046c1854762455282b219dbcc5f8f5 | |
parent | Remove support for insecure EC2N groups. Clarify which Diffie-Hellman (diff) | |
download | wireguard-openbsd-a4b6a136706727dfb4b03203fdd5a81440fedbca.tar.xz wireguard-openbsd-a4b6a136706727dfb4b03203fdd5a81440fedbca.zip |
Rather than attempting to lookup the keyword "set" as a hostname,
issue a usage message. This matches both historical behaviour, and
the operation upon other keywords.
ok florian
-rw-r--r-- | usr.bin/dig/nslookup.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/dig/nslookup.c b/usr.bin/dig/nslookup.c index 570706f72d3..76b7abfe215 100644 --- a/usr.bin/dig/nslookup.c +++ b/usr.bin/dig/nslookup.c @@ -719,10 +719,12 @@ do_next_command(char *input) { if (ptr == NULL) return; arg = next_token(&input, " \t\r\n"); - if ((strcasecmp(ptr, "set") == 0) && - (arg != NULL)) - setoption(arg); - else if ((strcasecmp(ptr, "server") == 0) || + if (strcasecmp(ptr, "set") == 0) { + if (arg == NULL) + printf("Usage: set keyword=value, or set all\n"); + else + setoption(arg); + } else if ((strcasecmp(ptr, "server") == 0) || (strcasecmp(ptr, "lserver") == 0)) { isc_result_t res; |