diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-06-18 10:05:16 -0400 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-08-14 20:02:05 +0000 |
| commit | 7f9a4fd7013d9b08ff85f018e23f08ec02c2a514 (patch) | |
| tree | febfcfb66478ae13d924c3e4f96be8aff3fc0f66 /ripngd/ripng_interface.c | |
| parent | 77cbe4a1b3a7a064c2d001f575185760655e3765 (diff) | |
ripngd: Convert over to using LIB_ERR_XXXX for zlog_ferr
Convert over those zlog_err functions to zlog_ferr that
are appropriate for the LIB_ERR_XXX.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'ripngd/ripng_interface.c')
| -rw-r--r-- | ripngd/ripng_interface.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c index c463630b12..804cb26594 100644 --- a/ripngd/ripng_interface.c +++ b/ripngd/ripng_interface.c @@ -35,6 +35,7 @@ #include "thread.h" #include "privs.h" #include "vrf.h" +#include "lib_errors.h" #include "ripngd/ripngd.h" #include "ripngd/ripng_debug.h" @@ -72,14 +73,18 @@ static int ripng_multicast_join(struct interface *ifp) * for this call as a workaround. */ if (ripngd_privs.change(ZPRIVS_RAISE)) - zlog_err("ripng_multicast_join: could not raise privs"); + zlog_ferr( + LIB_ERR_PRIVILEGES, + "ripng_multicast_join: could not raise privs"); ret = setsockopt(ripng->sock, IPPROTO_IPV6, IPV6_JOIN_GROUP, (char *)&mreq, sizeof(mreq)); save_errno = errno; if (ripngd_privs.change(ZPRIVS_LOWER)) - zlog_err("ripng_multicast_join: could not lower privs"); + zlog_ferr( + LIB_ERR_PRIVILEGES, + "ripng_multicast_join: could not lower privs"); if (ret < 0 && save_errno == EADDRINUSE) { /* @@ -642,8 +647,9 @@ static int ripng_interface_wakeup(struct thread *t) /* Join to multicast group. */ if (ripng_multicast_join(ifp) < 0) { - zlog_err("multicast join failed, interface %s not running", - ifp->name); + zlog_ferr(LIB_ERR_SOCKET, + "multicast join failed, interface %s not running", + ifp->name); return 0; } |
