summaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/ip/lookup.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/vnet/vnet/ip/lookup.c b/vnet/vnet/ip/lookup.c
index 8531f645629..ebf2ba0cb18 100644
--- a/vnet/vnet/ip/lookup.c
+++ b/vnet/vnet/ip/lookup.c
@@ -1045,16 +1045,17 @@ u8 * format_ip_adjacency (u8 * s, va_list * args)
ip_adj_register_t *reg;
if (adj->lookup_next_index < vec_len (lm->registered_adjacencies))
+ {
+ reg = vec_elt_at_index(lm->registered_adjacencies,
+ adj->lookup_next_index);
+ if (reg->fn)
{
- reg = vec_elt_at_index(lm->registered_adjacencies,
- adj->lookup_next_index);
- if (reg->fn)
- {
- s = format(s, " %U", reg->fn, lm, adj);
- goto format_done;
- }
+ s = format(s, " ");
+ s = reg->fn(s, lm, adj);
+ goto format_done;
}
-
+ }
+
switch (adj->lookup_next_index)
{
case IP_LOOKUP_NEXT_REWRITE: