summaryrefslogtreecommitdiff
path: root/zebra/rt_socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/rt_socket.c')
-rw-r--r--zebra/rt_socket.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
index c0ad87ce39..a6de84d56f 100644
--- a/zebra/rt_socket.c
+++ b/zebra/rt_socket.c
@@ -40,6 +40,7 @@
#include "zebra/rt.h"
#include "zebra/kernel_socket.h"
#include "zebra/zebra_mpls.h"
+#include "zebra/zebra_errors.h"
extern struct zebra_privs_t zserv_privs;
@@ -72,10 +73,10 @@ static int kernel_rtm_add_labels(struct mpls_label_stack *nh_label,
struct sockaddr_mpls *smpls)
{
if (nh_label->num_labels > 1) {
- zlog_warn(
- "%s: can't push %u labels at "
- "once (maximum is 1)",
- __func__, nh_label->num_labels);
+ flog_warn(EC_ZEBRA_MAX_LABELS_PUSH,
+ "%s: can't push %u labels at "
+ "once (maximum is 1)",
+ __func__, nh_label->num_labels);
return -1;
}
@@ -213,7 +214,7 @@ static int kernel_rtm_ipv4(int cmd, const struct prefix *p,
case ZEBRA_ERR_RTEXIST:
if (cmd != RTM_ADD)
flog_err(
- LIB_ERR_SYSTEM_CALL,
+ EC_LIB_SYSTEM_CALL,
"%s: rtm_write() returned %d for command %d",
__func__, error, cmd);
continue;
@@ -227,7 +228,7 @@ static int kernel_rtm_ipv4(int cmd, const struct prefix *p,
case ZEBRA_ERR_RTUNREACH:
default:
flog_err(
- LIB_ERR_SYSTEM_CALL,
+ EC_LIB_SYSTEM_CALL,
"%s: %s: rtm_write() unexpectedly returned %d for command %s",
__func__,
prefix2str(p, prefix_buf,
@@ -399,7 +400,8 @@ enum dp_req_result kernel_route_rib(struct route_node *rn,
int route = 0;
if (src_p && src_p->prefixlen) {
- zlog_warn("%s: IPv6 sourcedest routes unsupported!", __func__);
+ flog_warn(EC_ZEBRA_UNSUPPORTED_V6_SRCDEST,
+ "%s: IPv6 sourcedest routes unsupported!", __func__);
return DP_REQUEST_FAILURE;
}