summaryrefslogtreecommitdiffstats
path: root/zebra/rtadv.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-06-19 20:29:05 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-08-14 22:02:05 +0200
commit43e52561b476e4810e0a1280769e800e2d619621 (patch)
tree9d8639c395d92ebcd38261371ec2103f36ce42b5 /zebra/rtadv.c
parentisisd: Cleanup compile issue (diff)
downloadfrr-43e52561b476e4810e0a1280769e800e2d619621.tar.xz
frr-43e52561b476e4810e0a1280769e800e2d619621.zip
zebra, lib: error references for zebra
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'zebra/rtadv.c')
-rw-r--r--zebra/rtadv.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index 49ffcdd49..03eb1566a 100644
--- a/zebra/rtadv.c
+++ b/zebra/rtadv.c
@@ -35,6 +35,7 @@
#include "privs.h"
#include "vrf.h"
#include "ns.h"
+#include "lib_errors.h"
#include "zebra/interface.h"
#include "zebra/rtadv.h"
@@ -180,7 +181,7 @@ static void rtadv_send_packet(int sock, struct interface *ifp)
adata = calloc(1, CMSG_SPACE(sizeof(struct in6_pktinfo)));
if (adata == NULL) {
- zlog_err(
+ zlog_warn(
"rtadv_send_packet: can't malloc control data");
exit(-1);
}
@@ -373,9 +374,10 @@ static void rtadv_send_packet(int sock, struct interface *ifp)
ret = sendmsg(sock, &msg, 0);
if (ret < 0) {
- zlog_err("%s(%u): Tx RA failed, socket %u error %d (%s)",
- ifp->name, ifp->ifindex, sock, errno,
- safe_strerror(errno));
+ zlog_ferr(LIB_ERR_SOCKET,
+ "%s(%u): Tx RA failed, socket %u error %d (%s)",
+ ifp->name, ifp->ifindex, sock, errno,
+ safe_strerror(errno));
} else
zif->ra_sent++;
}
@@ -629,14 +631,16 @@ static int rtadv_make_socket(ns_id_t ns_id)
struct icmp6_filter filter;
if (zserv_privs.change(ZPRIVS_RAISE))
- zlog_err("rtadv_make_socket: could not raise privs, %s",
- safe_strerror(errno));
+ zlog_ferr(LIB_ERR_PRIVILEGES,
+ "rtadv_make_socket: could not raise privs, %s",
+ safe_strerror(errno));
sock = ns_socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6, ns_id);
if (zserv_privs.change(ZPRIVS_LOWER))
- zlog_err("rtadv_make_socket: could not lower privs, %s",
- safe_strerror(errno));
+ zlog_ferr(LIB_ERR_PRIVILEGES,
+ "rtadv_make_socket: could not lower privs, %s",
+ safe_strerror(errno));
if (sock < 0) {
return -1;