diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2019-03-12 06:17:59 -0700 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2019-03-12 18:40:30 +0000 |
commit | 24b77d1be041f576106cf86ceeb09d12d8d0ad57 (patch) | |
tree | 067193181f1cdd98f4235f54befc74882f1ff09e /src/vnet/dns/dns.c | |
parent | 36abbf10045ba81733410f50a3f5a9463f7137d1 (diff) |
VPP-1585: fix dns test cli
Change-Id: Iac105e09bb88434fe55365fc1546d769f034e0e2
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/dns/dns.c')
-rw-r--r-- | src/vnet/dns/dns.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/dns/dns.c b/src/vnet/dns/dns.c index 15d40beb710..7d52f751128 100644 --- a/src/vnet/dns/dns.c +++ b/src/vnet/dns/dns.c @@ -2684,7 +2684,7 @@ test_dns_expire_command_fn (vlib_main_t * vm, vlib_cli_command_t * cmd) { dns_main_t *dm = &dns_main; - u8 *name; + u8 *name = 0; uword *p; clib_error_t *e; dns_cache_entry_t *ep; @@ -2694,6 +2694,8 @@ test_dns_expire_command_fn (vlib_main_t * vm, vec_add1 (name, 0); _vec_len (name) -= 1; } + else + return clib_error_return (0, "no name provided"); dns_cache_lock (dm); |