diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-11-08 09:03:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-08 09:03:00 +0100 |
commit | f6d708bc804c76b140c45071365b1a10931ad224 (patch) | |
tree | 5173d219d2425a14ac30b4f53a305e155e198f4a /zebra | |
parent | Merge pull request #14746 from LabNConsulting/valgrind-leak-kinds (diff) | |
parent | *: Move distance related defines into their own header (diff) | |
download | frr-f6d708bc804c76b140c45071365b1a10931ad224.tar.xz frr-f6d708bc804c76b140c45071365b1a10931ad224.zip |
Merge pull request #14741 from donaldsharp/zebra_h_cleanup
Zebra h cleanup
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/dplane_fpm_nl.c | 3 | ||||
-rw-r--r-- | zebra/if_netlink.c | 2 | ||||
-rw-r--r-- | zebra/kernel_netlink.c | 3 | ||||
-rw-r--r-- | zebra/kernel_socket.c | 6 | ||||
-rw-r--r-- | zebra/main.c | 4 | ||||
-rw-r--r-- | zebra/netconf_netlink.c | 2 | ||||
-rw-r--r-- | zebra/redistribute.c | 1 | ||||
-rw-r--r-- | zebra/rule_netlink.c | 3 | ||||
-rw-r--r-- | zebra/tc_netlink.c | 1 | ||||
-rw-r--r-- | zebra/zapi_msg.c | 1 | ||||
-rw-r--r-- | zebra/zebra_evpn_neigh.c | 4 | ||||
-rw-r--r-- | zebra/zebra_fpm.c | 4 | ||||
-rw-r--r-- | zebra/zebra_fpm_dt.c | 4 | ||||
-rw-r--r-- | zebra/zebra_fpm_netlink.c | 3 | ||||
-rw-r--r-- | zebra/zebra_mpls_netlink.c | 3 | ||||
-rw-r--r-- | zebra/zebra_netns_id.c | 4 | ||||
-rw-r--r-- | zebra/zebra_ns.h | 2 | ||||
-rw-r--r-- | zebra/zebra_rib.c | 5 | ||||
-rw-r--r-- | zebra/zebra_vty.c | 1 |
19 files changed, 51 insertions, 5 deletions
diff --git a/zebra/dplane_fpm_nl.c b/zebra/dplane_fpm_nl.c index 70bcfe449..c98655fdb 100644 --- a/zebra/dplane_fpm_nl.c +++ b/zebra/dplane_fpm_nl.c @@ -19,6 +19,9 @@ #include <string.h> #include "lib/zebra.h" + +#include <linux/rtnetlink.h> + #include "lib/json.h" #include "lib/libfrr.h" #include "lib/frratomic.h" diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c index ed2e0a224..6dad69396 100644 --- a/zebra/if_netlink.c +++ b/zebra/if_netlink.c @@ -17,6 +17,8 @@ #define _LINUX_IF_H #define _LINUX_IP_H +#include <linux/netlink.h> +#include <linux/rtnetlink.h> #include <netinet/if_ether.h> #include <linux/if_bridge.h> #include <linux/if_link.h> diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c index 3f4a03192..8b59ecd87 100644 --- a/zebra/kernel_netlink.c +++ b/zebra/kernel_netlink.c @@ -6,6 +6,9 @@ #include <zebra.h> #ifdef HAVE_NETLINK +#include <linux/netlink.h> +#include <linux/rtnetlink.h> +#include <linux/filter.h> #include "linklist.h" #include "if.h" diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index d897f4a1d..62adbc0c3 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -48,11 +48,7 @@ extern struct zebra_privs_t zserv_privs; * 0). We follow this practice without questioning it, but it is a * bug if frr calls ROUNDUP with 0. */ -#ifdef __APPLE__ -#define ROUNDUP_TYPE int -#else -#define ROUNDUP_TYPE long -#endif +#define ROUNDUP_TYPE long /* * Because of these varying conventions, the only sane approach is for diff --git a/zebra/main.c b/zebra/main.c index 158d1b8c4..aea30daa3 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -5,6 +5,10 @@ #include <zebra.h> +#ifdef GNU_LINUX +#include <linux/rtnetlink.h> +#endif + #include <lib/version.h> #include "getopt.h" #include "command.h" diff --git a/zebra/netconf_netlink.c b/zebra/netconf_netlink.c index 7352dfb2e..9a0b3c5d0 100644 --- a/zebra/netconf_netlink.c +++ b/zebra/netconf_netlink.c @@ -11,6 +11,8 @@ #include <ns.h> +#include <linux/netlink.h> +#include <linux/rtnetlink.h> #include "linux/netconf.h" #include "lib/lib_errors.h" diff --git a/zebra/redistribute.c b/zebra/redistribute.c index 1cfed6df4..1ee983916 100644 --- a/zebra/redistribute.c +++ b/zebra/redistribute.c @@ -16,6 +16,7 @@ #include "log.h" #include "vrf.h" #include "srcdest_table.h" +#include "frrdistance.h" #include "zebra/rib.h" #include "zebra/zebra_router.h" diff --git a/zebra/rule_netlink.c b/zebra/rule_netlink.c index f00aef52c..05282793d 100644 --- a/zebra/rule_netlink.c +++ b/zebra/rule_netlink.c @@ -9,6 +9,9 @@ #ifdef HAVE_NETLINK +#include <linux/netlink.h> +#include <linux/rtnetlink.h> + #include "if.h" #include "prefix.h" #include "vrf.h" diff --git a/zebra/tc_netlink.c b/zebra/tc_netlink.c index d633c0777..19667e66a 100644 --- a/zebra/tc_netlink.c +++ b/zebra/tc_netlink.c @@ -9,6 +9,7 @@ #ifdef HAVE_NETLINK +#include <linux/rtnetlink.h> #include <linux/pkt_cls.h> #include <linux/pkt_sched.h> #include <netinet/if_ether.h> diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index 856c906bd..34977a914 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -24,6 +24,7 @@ #include "lib/vrf.h" #include "lib/libfrr.h" #include "lib/lib_errors.h" +#include "lib/frrdistance.h" #include "zebra/zebra_router.h" #include "zebra/rib.h" diff --git a/zebra/zebra_evpn_neigh.c b/zebra/zebra_evpn_neigh.c index a00d8c969..81705d4e8 100644 --- a/zebra/zebra_evpn_neigh.c +++ b/zebra/zebra_evpn_neigh.c @@ -6,6 +6,10 @@ #include <zebra.h> +#ifdef GNU_LINUX +#include <linux/neighbour.h> +#endif + #include "hash.h" #include "interface.h" #include "jhash.h" diff --git a/zebra/zebra_fpm.c b/zebra/zebra_fpm.c index 699f3ed11..92dc591d4 100644 --- a/zebra/zebra_fpm.c +++ b/zebra/zebra_fpm.c @@ -8,6 +8,10 @@ #include <zebra.h> +#ifdef GNU_LINUX +#include <linux/rtnetlink.h> +#endif + #include "log.h" #include "libfrr.h" #include "stream.h" diff --git a/zebra/zebra_fpm_dt.c b/zebra/zebra_fpm_dt.c index 94308a961..ce5eb6fe1 100644 --- a/zebra/zebra_fpm_dt.c +++ b/zebra/zebra_fpm_dt.c @@ -22,6 +22,10 @@ */ #include <zebra.h> + +#ifdef GNU_LINUX +#include <linux/rtnetlink.h> +#endif #include "log.h" #include "vrf.h" diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c index 127976223..1dd96347f 100644 --- a/zebra/zebra_fpm_netlink.c +++ b/zebra/zebra_fpm_netlink.c @@ -11,6 +11,9 @@ #ifdef HAVE_NETLINK +#include <linux/rtnetlink.h> +#include <linux/neighbour.h> + #include "log.h" #include "rib.h" #include "vty.h" diff --git a/zebra/zebra_mpls_netlink.c b/zebra/zebra_mpls_netlink.c index 4bc676f39..b76640743 100644 --- a/zebra/zebra_mpls_netlink.c +++ b/zebra/zebra_mpls_netlink.c @@ -7,6 +7,9 @@ #ifdef HAVE_NETLINK +#include <linux/netlink.h> +#include <linux/rtnetlink.h> + #include "zebra/debug.h" #include "zebra/rt.h" #include "zebra/rt_netlink.h" diff --git a/zebra/zebra_netns_id.c b/zebra/zebra_netns_id.c index 0531ab959..ae8f9d9a8 100644 --- a/zebra/zebra_netns_id.c +++ b/zebra/zebra_netns_id.c @@ -6,6 +6,10 @@ #include <zebra.h> +#ifdef GNU_LINUX +#include <linux/if_link.h> +#endif + #include "ns.h" #include "vrf.h" #include "log.h" diff --git a/zebra/zebra_ns.h b/zebra/zebra_ns.h index edf261197..cda8bada0 100644 --- a/zebra/zebra_ns.h +++ b/zebra/zebra_ns.h @@ -18,6 +18,8 @@ extern "C" { #endif #ifdef HAVE_NETLINK +#include <linux/netlink.h> + /* Socket interface to kernel */ struct nlsock { int sock; diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 37c042c04..05ac3f3d8 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -5,6 +5,10 @@ #include <zebra.h> +#ifdef GNU_LINUX +#include <linux/rtnetlink.h> +#endif + #include "command.h" #include "if.h" #include "linklist.h" @@ -25,6 +29,7 @@ #include "frr_pthread.h" #include "printfrr.h" #include "frrscript.h" +#include "frrdistance.h" #include "zebra/zebra_router.h" #include "zebra/connected.h" diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 8c9724873..a584cf638 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -20,6 +20,7 @@ #include "vxlan.h" #include "termtable.h" #include "affinitymap.h" +#include "frrdistance.h" #include "zebra/zebra_router.h" #include "zebra/zserv.h" |