diff options
author | Dave Barach <dave@barachs.net> | 2020-01-28 17:03:05 -0500 |
---|---|---|
committer | Dave Barach <dave@barachs.net> | 2020-01-28 17:05:58 -0500 |
commit | f31acfafb2e78841c0cc1813ddf787829d7f937d (patch) | |
tree | 59ea060f32fac88f647705f03065cbd9d288e45b /src | |
parent | 30928f87a3c9d98e288d1364d50c032e052e69ab (diff) |
dhcp: disable extraneous vlib_log spew
When there are no dhcp client interfaces configured, it's not
useful to make periodic / timeout log entries.
Type: fix
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I16b68fe15ad9de789e49ad1b782b3b0e536bad60
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/dhcp/client.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/plugins/dhcp/client.c b/src/plugins/dhcp/client.c index 441590cbcee..8dc57cb78ce 100644 --- a/src/plugins/dhcp/client.c +++ b/src/plugins/dhcp/client.c @@ -887,15 +887,18 @@ dhcp_client_process (vlib_main_t * vm, break; case ~0: - /* *INDENT-OFF* */ - DHCP_INFO ("timeout"); - pool_foreach (c, dcm->clients, - ({ - timeout = dhcp_client_sm (now, timeout, - (uword) (c - dcm->clients)); - })); - /* *INDENT-ON* */ - if (pool_elts (dcm->clients) == 0) + if (pool_elts (dcm->clients)) + { + DHCP_INFO ("timeout"); + /* *INDENT-OFF* */ + pool_foreach (c, dcm->clients, + ({ + timeout = dhcp_client_sm (now, timeout, + (uword) (c - dcm->clients)); + })); + /* *INDENT-ON* */ + } + else timeout = 100.0; break; } |