summaryrefslogtreecommitdiff
path: root/zebra/zebra_mpls_openbsd.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-06-19 18:29:05 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-08-14 20:02:05 +0000
commit43e52561b476e4810e0a1280769e800e2d619621 (patch)
tree9d8639c395d92ebcd38261371ec2103f36ce42b5 /zebra/zebra_mpls_openbsd.c
parentb72002107f4fdaf1b5044234426ecea88b1eaaaa (diff)
zebra, lib: error references for zebra
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_mpls_openbsd.c')
-rw-r--r--zebra/zebra_mpls_openbsd.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/zebra/zebra_mpls_openbsd.c b/zebra/zebra_mpls_openbsd.c
index c684167e38..91e1d7118d 100644
--- a/zebra/zebra_mpls_openbsd.c
+++ b/zebra/zebra_mpls_openbsd.c
@@ -124,7 +124,8 @@ static int kernel_send_rtmsg_v4(int action, mpls_label_t in_label,
zlog_ferr(LIB_ERR_PRIVILEGES, "Can't lower privileges");
if (ret == -1)
- zlog_err("%s: %s", __func__, safe_strerror(errno));
+ zlog_ferr(LIB_ERR_SOCKET, "%s: %s", __func__,
+ safe_strerror(errno));
return ret;
}
@@ -232,7 +233,8 @@ static int kernel_send_rtmsg_v6(int action, mpls_label_t in_label,
zlog_ferr(LIB_ERR_PRIVILEGES, "Can't lower privileges");
if (ret == -1)
- zlog_err("%s: %s", __func__, safe_strerror(errno));
+ zlog_ferr(LIB_ERR_SOCKET, "%s: %s", __func__,
+ safe_strerror(errno));
return ret;
}
@@ -361,8 +363,8 @@ static int kmpw_install(struct zebra_pw *pw)
imr.imr_type = IMR_TYPE_ETHERNET_TAGGED;
break;
default:
- zlog_err("%s: unhandled pseudowire type (%#X)", __func__,
- pw->type);
+ zlog_warn("%s: unhandled pseudowire type (%#X)", __func__,
+ pw->type);
return -1;
}
@@ -383,8 +385,8 @@ static int kmpw_install(struct zebra_pw *pw)
sa_in6->sin6_addr = pw->nexthop.ipv6;
break;
default:
- zlog_err("%s: unhandled pseudowire address-family (%u)",
- __func__, pw->af);
+ zlog_warn("%s: unhandled pseudowire address-family (%u)",
+ __func__, pw->af);
return -1;
}
memcpy(&imr.imr_nexthop, (struct sockaddr *)&ss,
@@ -399,7 +401,8 @@ static int kmpw_install(struct zebra_pw *pw)
strlcpy(ifr.ifr_name, pw->ifname, sizeof(ifr.ifr_name));
ifr.ifr_data = (caddr_t)&imr;
if (ioctl(kr_state.ioctl_fd, SIOCSETMPWCFG, &ifr) == -1) {
- zlog_err("ioctl SIOCSETMPWCFG: %s", safe_strerror(errno));
+ zlog_ferr(LIB_ERR_SYSTEM_CALL, "ioctl SIOCSETMPWCFG: %s",
+ safe_strerror(errno));
return -1;
}
@@ -416,7 +419,8 @@ static int kmpw_uninstall(struct zebra_pw *pw)
strlcpy(ifr.ifr_name, pw->ifname, sizeof(ifr.ifr_name));
ifr.ifr_data = (caddr_t)&imr;
if (ioctl(kr_state.ioctl_fd, SIOCSETMPWCFG, &ifr) == -1) {
- zlog_err("ioctl SIOCSETMPWCFG: %s", safe_strerror(errno));
+ zlog_ferr(LIB_ERR_SYSTEM_CALL, "ioctl SIOCSETMPWCFG: %s",
+ safe_strerror(errno));
return -1;
}