From af1d3370cedee6e8f7f4524886560e2394d7a704 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 19 Sep 2024 21:39:50 -0400 Subject: [PATCH] zebra: Remove some unused functions on linux build The functions: if_get_flags if_flags_update if_flags_mangle are never invoked from a linux netlink build. Put a #ifdef around those functions so that they are not included on the linux build as that they are not needed there. Signed-off-by: Donald Sharp --- zebra/interface.c | 2 ++ zebra/ioctl.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/zebra/interface.c b/zebra/interface.c index 281b21225dee..32e6d8a718e1 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -433,6 +433,7 @@ int if_subnet_delete(struct interface *ifp, struct connected *ifc) return 0; } +#ifndef HAVE_NETLINK /* if_flags_mangle: A place for hacks that require mangling * or tweaking the interface flags. * @@ -484,6 +485,7 @@ void if_flags_update(struct interface *ifp, uint64_t newflags) if_up(ifp, true); } } +#endif /* Wake up configured address if it is not in current kernel address. */ diff --git a/zebra/ioctl.c b/zebra/ioctl.c index a35784cd36e4..47ce7c943df8 100644 --- a/zebra/ioctl.c +++ b/zebra/ioctl.c @@ -390,6 +390,7 @@ int if_unset_prefix_ctx(const struct zebra_dplane_ctx *ctx) #endif /* HAVE_STRUCT_IFALIASREQ */ #endif /* HAVE_NETLINK */ +#ifndef HAVE_NETLINK /* get interface flags */ void if_get_flags(struct interface *ifp) { @@ -485,6 +486,7 @@ void if_get_flags(struct interface *ifp) out: if_flags_update(ifp, (ifreqflags.ifr_flags & 0x0000ffff)); } +#endif /* Set interface flags */ int if_set_flags(struct interface *ifp, uint64_t flags)