diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-06-14 16:38:40 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-08-14 22:02:05 +0200 |
commit | 174482ef377034d2ab3c14df0b4f4191731f1316 (patch) | |
tree | 90d03a36aad22fb51e00d218ffee2aba35950ef9 /zebra/zebra_mpls_openbsd.c | |
parent | lib: Add LIB_ERR_SNMP (diff) | |
download | frr-174482ef377034d2ab3c14df0b4f4191731f1316.tar.xz frr-174482ef377034d2ab3c14df0b4f4191731f1316.zip |
bgpd, lib, zebra: Convert LIB_ERR_PRIVILEGES
For all the places we zlog_err about raising/lowering privileges, use
zlog_ferr.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_mpls_openbsd.c')
-rw-r--r-- | zebra/zebra_mpls_openbsd.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/zebra/zebra_mpls_openbsd.c b/zebra/zebra_mpls_openbsd.c index 412fe7d3d..c684167e3 100644 --- a/zebra/zebra_mpls_openbsd.c +++ b/zebra/zebra_mpls_openbsd.c @@ -31,6 +31,7 @@ #include "prefix.h" #include "interface.h" #include "log.h" +#include "lib_errors.h" extern struct zebra_privs_t zserv_privs; @@ -117,10 +118,10 @@ static int kernel_send_rtmsg_v4(int action, mpls_label_t in_label, } if (zserv_privs.change(ZPRIVS_RAISE)) - zlog_err("Can't raise privileges"); + zlog_ferr(LIB_ERR_PRIVILEGES, "Can't raise privileges"); ret = writev(kr_state.fd, iov, iovcnt); if (zserv_privs.change(ZPRIVS_LOWER)) - zlog_err("Can't lower privileges"); + zlog_ferr(LIB_ERR_PRIVILEGES, "Can't lower privileges"); if (ret == -1) zlog_err("%s: %s", __func__, safe_strerror(errno)); @@ -225,10 +226,10 @@ static int kernel_send_rtmsg_v6(int action, mpls_label_t in_label, } if (zserv_privs.change(ZPRIVS_RAISE)) - zlog_err("Can't raise privileges"); + zlog_ferr(LIB_ERR_PRIVILEGES, "Can't raise privileges"); ret = writev(kr_state.fd, iov, iovcnt); if (zserv_privs.change(ZPRIVS_LOWER)) - zlog_err("Can't lower privileges"); + zlog_ferr(LIB_ERR_PRIVILEGES, "Can't lower privileges"); if (ret == -1) zlog_err("%s: %s", __func__, safe_strerror(errno)); |