]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: fix includes 2903/head
authorQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 24 Aug 2018 17:14:09 +0000 (17:14 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Thu, 6 Sep 2018 20:56:41 +0000 (20:56 +0000)
Add and remove error related includes as necessary.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
21 files changed:
zebra/if_ioctl.c
zebra/if_ioctl_solaris.c
zebra/if_sysctl.c
zebra/ioctl.c
zebra/ioctl_solaris.c
zebra/ipforward_proc.c
zebra/ipforward_solaris.c
zebra/ipforward_sysctl.c
zebra/irdp_main.c
zebra/redistribute.c
zebra/rt_netlink.c
zebra/rt_socket.c
zebra/rtadv.c
zebra/rtread_getmsg.c
zebra/rtread_sysctl.c
zebra/rule_socket.c
zebra/zapi_msg.c
zebra/zebra_mpls_openbsd.c
zebra/zebra_ns.c
zebra/zebra_ptm.c
zebra/zserv.c

index 8b5830fa10c2b79833b060474ce4cc7f289f667e..6155e8c4e620e72250c1b2f57d6b8b3ba4710cd5 100644 (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>
 
index 1449925aaed5f967dd045486a0f37c7e03d8d5f8..6ad590973627debe625b473c4333763f040ec5e4 100644 (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 *);
index f4b552f286b0f02fff4efb9abdd41ae445e6dbe8..df0831a9fc038b26a6df6a971b36e4dd584d70bf 100644 (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)
 {
index 0469bc38c0432d0b3ac78f90787850d0423bbfa2..5c2380cdd7d94425a24990bd01fad0866906acd1 100644 (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
 
index 74a82e7499a612f9d69e17cec5c38ddcf9b56fad..2f92cf256b14dd7bf68373094b40deb2045459df 100644 (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;
 
index 3a766b1ea98cc114ef33fd80e259d7acf630dc33..8f44c377b33ecf873be3453ea95e808816f0f499 100644 (file)
@@ -25,7 +25,6 @@
 
 #include "log.h"
 #include "privs.h"
-#include "lib_errors.h"
 
 #include "zebra/ipforward.h"
 
index 4a3966ca262c422b2e7d7277cdec07a06e86a7b7..7f372e32f8ced6bbae1100542a6d2bbb97a0efb8 100644 (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
index e5974412d81704bafd1e686172dbf63bb49cb56a..24ebf0a289a6bb746ffff1c12c00c4be936bbb86 100644 (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;
                }
index b96405f9ee80baa5458da257d367341dd9e55761..fe7e58e1a97e7da7d9994256b141d3cd52b68a22 100644 (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"
index 7450dc37266207a4441d7217e5c665b4cb03e3b1..f302553554b1cbb09b765a75a118131753b69dd2 100644 (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
 
index 7f475fe7d73a547afaa2ba17a0605c796629f99e..a6b350de77f3b7afbe2fb6ce9cbcd22f97621512 100644 (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
index 1e51a48203ba28b3a63ead576a356d4caabc947e..2ee450dd9e42d4073eb7dc99e528ad3a91ba5ff0 100644 (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;
 
index 61b4caa0b7f64bd484af1faa31cce2579821c673..696190492e518e1a28f85cffdfc23f1cb3322d3e 100644 (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;
 
index 1363fafec2aaceb0ea99db032dd0153fda46ade1..c82f68984105726f54c794a4f7ec13d374cbc6d2 100644 (file)
 #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
index ca3ff2dc65846e4b3ae9980e1d99da878f8e8d0c..5f6b62df2373a305e8025468476fecf551d14fb5 100644 (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;
        }
index 620410de0472280ae19ad57427af55465637e9fc..8faca1bbc83455f07bb20305e3e08e01490f540f 100644 (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)
 {
index c8c3dc2e474442e23c8c618df7fa3e602e74fa9d..e4fbb73626d71774649371c2469896c9bd66fa42 100644 (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 -------------------------------------------------------- */
 
index 44eb64cbd409dbe81778d8304eeb4000972d9b6e..b42cf32434c4329353367172f1c2e888db71d8f6 100644 (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"
index 456253cc30362df33f2f68b1c693b23b4468c44b..aedb7c94956272dbeb4c2e21fd8b65f691be74b9 100644 (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"
index 5bbb8ec59db2580102d9e6fdd99bfcb9e174c23b..7f9b70b0a11ac22c954437a95a092a38e7b2311b 100644 (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"
index cd4872bd02ac0f800d4102da908392ed1e7db90c..d1d6a2d3f70466b3ea39e1cbea5ed637d87f12cb 100644 (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 */