diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-06-14 10:38:40 -0400 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-08-14 20:02:05 +0000 |
| commit | 174482ef377034d2ab3c14df0b4f4191731f1316 (patch) | |
| tree | 90d03a36aad22fb51e00d218ffee2aba35950ef9 /zebra/zebra_mpls_openbsd.c | |
| parent | 220d736886228043c8d3503eab9cc9831d9c2834 (diff) | |
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 412fe7d3dd..c684167e38 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)); |
