summaryrefslogtreecommitdiff
path: root/lib/routemap.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-03-08 07:38:21 -0500
committerGitHub <noreply@github.com>2017-03-08 07:38:21 -0500
commit790c77ed025f2d71d0aed1f0183bbedbbc1799e6 (patch)
tree08ce899248d37a102c3be14136ec7103c59b37a8 /lib/routemap.c
parentae6ba9ba043652bde3b0000f5299eff31d351ee3 (diff)
parent2fcc7988ea09b8505c0fbf134ecffe98e4c026b6 (diff)
Merge pull request #261 from opensourcerouting/lib_cleanup
startup, option parsing & logging refactor
Diffstat (limited to 'lib/routemap.c')
-rw-r--r--lib/routemap.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/routemap.c b/lib/routemap.c
index 39d9a5d375..1647ac3668 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -28,6 +28,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "routemap.h"
#include "command.h"
#include "log.h"
+#include "log_int.h"
#include "hash.h"
DEFINE_MTYPE_STATIC(LIB, ROUTE_MAP, "Route map")
@@ -991,7 +992,7 @@ vty_show_route_map_entry (struct vty *vty, struct route_map *map)
/* Print the name of the protocol */
if (zlog_default)
{
- vty_out (vty, "%s", zlog_proto_names[zlog_default->protocol]);
+ vty_out (vty, "%s", zlog_protoname());
if (zlog_default->instance)
vty_out (vty, " %d", zlog_default->instance);
}
@@ -1051,8 +1052,7 @@ vty_show_route_map (struct vty *vty, const char *name)
}
else
{
- if (zlog_default)
- vty_out (vty, "%s", zlog_proto_names[zlog_default->protocol]);
+ vty_out (vty, "%s", zlog_protoname());
if (zlog_default && zlog_default->instance)
vty_out (vty, " %d", zlog_default->instance);
vty_out (vty, ": 'route-map %s' not found%s", name, VTY_NEWLINE);
@@ -1614,9 +1614,8 @@ route_map_apply (struct route_map *map, struct prefix *prefix,
if (recursion > RMAP_RECURSION_LIMIT)
{
- zlog (NULL, LOG_WARNING,
- "route-map recursion limit (%d) reached, discarding route",
- RMAP_RECURSION_LIMIT);
+ zlog_warn("route-map recursion limit (%d) reached, discarding route",
+ RMAP_RECURSION_LIMIT);
recursion = 0;
return RMAP_DENYMATCH;
}