summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--zebra/if_ioctl.c1
-rw-r--r--zebra/if_ioctl_solaris.c1
-rw-r--r--zebra/if_sysctl.c1
-rw-r--r--zebra/ioctl.c1
-rw-r--r--zebra/ioctl_solaris.c1
-rw-r--r--zebra/ipforward_proc.c1
-rw-r--r--zebra/ipforward_solaris.c1
-rw-r--r--zebra/ipforward_sysctl.c12
-rw-r--r--zebra/irdp_main.c1
-rw-r--r--zebra/redistribute.c1
-rw-r--r--zebra/rt_netlink.c1
-rw-r--r--zebra/rt_socket.c1
-rw-r--r--zebra/rtadv.c1
-rw-r--r--zebra/rtread_getmsg.c2
-rw-r--r--zebra/rtread_sysctl.c3
-rw-r--r--zebra/rule_socket.c1
-rw-r--r--zebra/zapi_msg.c1
-rw-r--r--zebra/zebra_mpls_openbsd.c1
-rw-r--r--zebra/zebra_ns.c1
-rw-r--r--zebra/zebra_ptm.c1
-rw-r--r--zebra/zserv.c1
21 files changed, 26 insertions, 9 deletions
diff --git a/zebra/if_ioctl.c b/zebra/if_ioctl.c
index 8b5830fa1..6155e8c4e 100644
--- a/zebra/if_ioctl.c
+++ b/zebra/if_ioctl.c
@@ -38,6 +38,7 @@
#include "zebra/interface.h"
#include "zebra/rib.h"
#include "zebra/rt.h"
+#include "zebra/zebra_errors.h"
#include <ifaddrs.h>
diff --git a/zebra/if_ioctl_solaris.c b/zebra/if_ioctl_solaris.c
index 1449925aa..6ad590973 100644
--- a/zebra/if_ioctl_solaris.c
+++ b/zebra/if_ioctl_solaris.c
@@ -39,6 +39,7 @@
#include "zebra/interface.h"
#include "zebra/ioctl_solaris.h"
#include "zebra/rib.h"
+#include "zebra/zebra_errors.h"
static int if_get_addr(struct interface *, struct sockaddr *, const char *);
static void interface_info_ioctl(struct interface *);
diff --git a/zebra/if_sysctl.c b/zebra/if_sysctl.c
index f4b552f28..df0831a9f 100644
--- a/zebra/if_sysctl.c
+++ b/zebra/if_sysctl.c
@@ -37,6 +37,7 @@
#include "zebra/rt.h"
#include "zebra/kernel_socket.h"
#include "zebra/rib.h"
+#include "zebra/zebra_errors.h"
void ifstat_update_sysctl(void)
{
diff --git a/zebra/ioctl.c b/zebra/ioctl.c
index 0469bc38c..5c2380cdd 100644
--- a/zebra/ioctl.c
+++ b/zebra/ioctl.c
@@ -33,6 +33,7 @@
#include "zebra/rib.h"
#include "zebra/rt.h"
#include "zebra/interface.h"
+#include "zebra/zebra_errors.h"
#ifndef SUNOS_5
diff --git a/zebra/ioctl_solaris.c b/zebra/ioctl_solaris.c
index 74a82e749..2f92cf256 100644
--- a/zebra/ioctl_solaris.c
+++ b/zebra/ioctl_solaris.c
@@ -37,6 +37,7 @@
#include "zebra/rt.h"
#include "zebra/interface.h"
#include "zebra/ioctl_solaris.h"
+#include "zebra/zebra_errors.h"
extern struct zebra_privs_t zserv_privs;
diff --git a/zebra/ipforward_proc.c b/zebra/ipforward_proc.c
index 3a766b1ea..8f44c377b 100644
--- a/zebra/ipforward_proc.c
+++ b/zebra/ipforward_proc.c
@@ -25,7 +25,6 @@
#include "log.h"
#include "privs.h"
-#include "lib_errors.h"
#include "zebra/ipforward.h"
diff --git a/zebra/ipforward_solaris.c b/zebra/ipforward_solaris.c
index 4a3966ca2..7f372e32f 100644
--- a/zebra/ipforward_solaris.c
+++ b/zebra/ipforward_solaris.c
@@ -29,6 +29,7 @@
#include "privs.h"
#include "zebra/ipforward.h"
+#include "zebra/zebra_errors.h"
/*
** Solaris should define IP_DEV_NAME in <inet/ip.h>, but we'll save
diff --git a/zebra/ipforward_sysctl.c b/zebra/ipforward_sysctl.c
index e5974412d..24ebf0a28 100644
--- a/zebra/ipforward_sysctl.c
+++ b/zebra/ipforward_sysctl.c
@@ -43,7 +43,7 @@ int ipforward(void)
len = sizeof ipforwarding;
if (sysctl(mib, MIB_SIZ, &ipforwarding, &len, 0, 0) < 0) {
- flog_err_sys(LIB_ERR_SYSCALL, "Can't get ipforwarding value");
+ flog_err_sys(LIB_ERR_SYSTEM_CALL, "Can't get ipforwarding value");
return -1;
}
return ipforwarding;
@@ -57,7 +57,7 @@ int ipforward_on(void)
len = sizeof ipforwarding;
frr_elevate_privs(&zserv_privs) {
if (sysctl(mib, MIB_SIZ, NULL, NULL, &ipforwarding, len) < 0) {
- flog_err_sys(LIB_ERR_SYSCALL,
+ flog_err_sys(LIB_ERR_SYSTEM_CALL,
"Can't set ipforwarding on");
return -1;
}
@@ -73,7 +73,7 @@ int ipforward_off(void)
len = sizeof ipforwarding;
frr_elevate_privs(&zserv_privs) {
if (sysctl(mib, MIB_SIZ, NULL, NULL, &ipforwarding, len) < 0) {
- flog_err_sys(LIB_ERR_SYSCALL,
+ flog_err_sys(LIB_ERR_SYSTEM_CALL,
"Can't set ipforwarding on");
return -1;
}
@@ -98,7 +98,7 @@ int ipforward_ipv6(void)
len = sizeof ip6forwarding;
frr_elevate_privs(&zserv_privs) {
if (sysctl(mib_ipv6, MIB_SIZ, &ip6forwarding, &len, 0, 0) < 0) {
- flog_err_sys(_LIB_ERR_SYSCALL,
+ flog_err_sys(LIB_ERR_SYSTEM_CALL,
"can't get ip6forwarding value");
return -1;
}
@@ -115,7 +115,7 @@ int ipforward_ipv6_on(void)
frr_elevate_privs(&zserv_privs) {
if (sysctl(mib_ipv6, MIB_SIZ, NULL, NULL, &ip6forwarding, len)
< 0) {
- flog_err_sys(LIB_ERR_SYSCALL,
+ flog_err_sys(LIB_ERR_SYSTEM_CALL,
"can't get ip6forwarding value");
return -1;
}
@@ -132,7 +132,7 @@ int ipforward_ipv6_off(void)
frr_elevate_privs(&zserv_privs) {
if (sysctl(mib_ipv6, MIB_SIZ, NULL, NULL, &ip6forwarding, len)
< 0) {
- flog_err_sys(LIB_ERR_SYSCALL,
+ flog_err_sys(LIB_ERR_SYSTEM_CALL,
"can't get ip6forwarding value");
return -1;
}
diff --git a/zebra/irdp_main.c b/zebra/irdp_main.c
index b96405f9e..fe7e58e1a 100644
--- a/zebra/irdp_main.c
+++ b/zebra/irdp_main.c
@@ -59,6 +59,7 @@
#include "zebra/zserv.h"
#include "zebra/redistribute.h"
#include "zebra/irdp.h"
+#include "zebra/zebra_errors.h"
#include <netinet/ip_icmp.h>
#include "checksum.h"
diff --git a/zebra/redistribute.c b/zebra/redistribute.c
index 7450dc372..f30255355 100644
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -43,6 +43,7 @@
#include "zebra/zapi_msg.h"
#include "zebra/zebra_memory.h"
#include "zebra/zebra_vxlan.h"
+#include "zebra/zebra_errors.h"
#define ZEBRA_PTM_SUPPORT
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 7f475fe7d..a6b350de7 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -64,6 +64,7 @@
#include "zebra/rt_netlink.h"
#include "zebra/zebra_mroute.h"
#include "zebra/zebra_vxlan.h"
+#include "zebra/zebra_errors.h"
#ifndef AF_MPLS
#define AF_MPLS 28
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
index 1e51a4820..2ee450dd9 100644
--- a/zebra/rt_socket.c
+++ b/zebra/rt_socket.c
@@ -40,6 +40,7 @@
#include "zebra/rt.h"
#include "zebra/kernel_socket.h"
#include "zebra/zebra_mpls.h"
+#include "zebra/zebra_errors.h"
extern struct zebra_privs_t zserv_privs;
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index 61b4caa0b..696190492 100644
--- a/zebra/rtadv.c
+++ b/zebra/rtadv.c
@@ -44,6 +44,7 @@
#include "zebra/zapi_msg.h"
#include "zebra/zebra_ns.h"
#include "zebra/zebra_vrf.h"
+#include "zebra/zebra_errors.h"
extern struct zebra_privs_t zserv_privs;
diff --git a/zebra/rtread_getmsg.c b/zebra/rtread_getmsg.c
index 1363fafec..c82f68984 100644
--- a/zebra/rtread_getmsg.c
+++ b/zebra/rtread_getmsg.c
@@ -28,9 +28,11 @@
#include "if.h"
#include "vrf.h"
#include "vty.h"
+#include "lib_errors.h"
#include "zebra/rib.h"
#include "zebra/rt.h"
+#include "zebra/zebra_errors.h"
/* Thank you, Solaris, for polluting application symbol namespace. */
#undef hook_register
diff --git a/zebra/rtread_sysctl.c b/zebra/rtread_sysctl.c
index ca3ff2dc6..5f6b62df2 100644
--- a/zebra/rtread_sysctl.c
+++ b/zebra/rtread_sysctl.c
@@ -31,6 +31,7 @@
#include "zebra/rt.h"
#include "zebra/kernel_socket.h"
#include "zebra/zebra_pbr.h"
+#include "zebra/zebra_errors.h"
/* Kernel routing table read up by sysctl function. */
void route_read(struct zebra_ns *zns)
@@ -47,7 +48,7 @@ void route_read(struct zebra_ns *zns)
/* Get buffer size. */
if (sysctl(mib, MIBSIZ, NULL, &bufsiz, NULL, 0) < 0) {
- flog_warn(ZEBRA_ERR_ZEBRA_ERR_SYSCTL_FAILED, "sysctl fail: %s",
+ flog_warn(ZEBRA_ERR_SYSCTL_FAILED, "sysctl fail: %s",
safe_strerror(errno));
return;
}
diff --git a/zebra/rule_socket.c b/zebra/rule_socket.c
index 620410de0..8faca1bbc 100644
--- a/zebra/rule_socket.c
+++ b/zebra/rule_socket.c
@@ -41,6 +41,7 @@
#include "zebra/kernel_netlink.h"
#include "zebra/rule_netlink.h"
#include "zebra/zebra_pbr.h"
+#include "zebra/zebra_errors.h"
enum dp_req_result kernel_add_pbr_rule(struct zebra_pbr_rule *rule)
{
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index c8c3dc2e4..e4fbb7362 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -62,6 +62,7 @@
#include "zebra/zebra_pbr.h"
#include "zebra/table_manager.h"
#include "zebra/zapi_msg.h"
+#include "zebra/zebra_errors.h"
/* Encoding helpers -------------------------------------------------------- */
diff --git a/zebra/zebra_mpls_openbsd.c b/zebra/zebra_mpls_openbsd.c
index 44eb64cbd..b42cf3243 100644
--- a/zebra/zebra_mpls_openbsd.c
+++ b/zebra/zebra_mpls_openbsd.c
@@ -26,6 +26,7 @@
#include "zebra/rt.h"
#include "zebra/zebra_mpls.h"
#include "zebra/debug.h"
+#include "zebra/zebra_errors.h"
#include "privs.h"
#include "prefix.h"
diff --git a/zebra/zebra_ns.c b/zebra/zebra_ns.c
index 456253cc3..aedb7c949 100644
--- a/zebra/zebra_ns.c
+++ b/zebra/zebra_ns.c
@@ -26,7 +26,6 @@
#include "lib/logicalrouter.h"
#include "lib/prefix.h"
#include "lib/memory.h"
-#include "lib/lib_errors.h"
#include "rtadv.h"
#include "zebra_ns.h"
diff --git a/zebra/zebra_ptm.c b/zebra/zebra_ptm.c
index 5bbb8ec59..7f9b70b0a 100644
--- a/zebra/zebra_ptm.c
+++ b/zebra/zebra_ptm.c
@@ -34,6 +34,7 @@
#include "version.h"
#include "vrf.h"
#include "vty.h"
+#include "lib_errors.h"
#include "zebra/debug.h"
#include "zebra/interface.h"
diff --git a/zebra/zserv.c b/zebra/zserv.c
index cd4872bd0..d1d6a2d3f 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -61,6 +61,7 @@
#include "zebra/zapi_msg.h" /* for zserv_handle_commands */
#include "zebra/zebra_vrf.h" /* for zebra_vrf_lookup_by_id, zvrf */
#include "zebra/zserv.h" /* for zserv */
+#include "zebra/zebra_errors.h" /* for error messages */
/* clang-format on */
/* privileges */