diff options
Diffstat (limited to 'zebra/rtread_sysctl.c')
| -rw-r--r-- | zebra/rtread_sysctl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/zebra/rtread_sysctl.c b/zebra/rtread_sysctl.c index fba67e3d0c..f88586a6ea 100644 --- a/zebra/rtread_sysctl.c +++ b/zebra/rtread_sysctl.c @@ -31,6 +31,7 @@ #include "zebra/rt.h" #include "zebra/kernel_socket.h" #include "zebra/zebra_pbr.h" +#include "zebra/zebra_errors.h" /* Kernel routing table read up by sysctl function. */ void route_read(struct zebra_ns *zns) @@ -47,7 +48,8 @@ void route_read(struct zebra_ns *zns) /* Get buffer size. */ if (sysctl(mib, MIBSIZ, NULL, &bufsiz, NULL, 0) < 0) { - zlog_warn("sysctl fail: %s", safe_strerror(errno)); + flog_warn(EC_ZEBRA_SYSCTL_FAILED, "sysctl fail: %s", + safe_strerror(errno)); return; } @@ -56,7 +58,8 @@ void route_read(struct zebra_ns *zns) /* Read routing table information by calling sysctl(). */ if (sysctl(mib, MIBSIZ, buf, &bufsiz, NULL, 0) < 0) { - zlog_warn("sysctl() fail by %s", safe_strerror(errno)); + flog_warn(EC_ZEBRA_SYSCTL_FAILED, "sysctl() fail by %s", + safe_strerror(errno)); XFREE(MTYPE_TMP, ref); return; } |
