zebra: fix includes

Add and remove error related includes as necessary.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2018-08-24 17:14:09 +00:00
parent c98d5ce810
commit 364fed6b07
21 changed files with 26 additions and 9 deletions

View File

@ -38,6 +38,7 @@
#include "zebra/interface.h"
#include "zebra/rib.h"
#include "zebra/rt.h"
#include "zebra/zebra_errors.h"
#include <ifaddrs.h>

View File

@ -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 *);

View File

@ -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)
{

View File

@ -33,6 +33,7 @@
#include "zebra/rib.h"
#include "zebra/rt.h"
#include "zebra/interface.h"
#include "zebra/zebra_errors.h"
#ifndef SUNOS_5

View File

@ -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;

View File

@ -25,7 +25,6 @@
#include "log.h"
#include "privs.h"
#include "lib_errors.h"
#include "zebra/ipforward.h"

View File

@ -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

View File

@ -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;
}

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;
}

View File

@ -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)
{

View File

@ -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 -------------------------------------------------------- */

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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 */