]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Remove some unused functions on linux build
authorDonald Sharp <sharpd@nvidia.com>
Fri, 20 Sep 2024 01:39:50 +0000 (21:39 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 25 Nov 2024 18:12:10 +0000 (13:12 -0500)
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 <sharpd@nvidia.com>
zebra/interface.c
zebra/ioctl.c

index 4090e81d68fa40dd2a63584fda0b99f2eac9164f..f7fd112cd4ce571d2a3fc086b316a273e6bcd8c7 100644 (file)
@@ -380,6 +380,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.
  *
@@ -431,6 +432,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. */
index a35784cd36e45e739de45d308164f1c7b783c8ff..47ce7c943df8f8b3726531604aa47b029c073b89 100644 (file)
@@ -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)