forked from Mirror/frr
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 <sharpd@nvidia.com>
This commit is contained in:
parent
c23f505f45
commit
a92854047b
|
@ -380,6 +380,7 @@ int if_subnet_delete(struct interface *ifp, struct connected *ifc)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef HAVE_NETLINK
|
||||||
/* if_flags_mangle: A place for hacks that require mangling
|
/* if_flags_mangle: A place for hacks that require mangling
|
||||||
* or tweaking the interface flags.
|
* or tweaking the interface flags.
|
||||||
*
|
*
|
||||||
|
@ -431,6 +432,7 @@ void if_flags_update(struct interface *ifp, uint64_t newflags)
|
||||||
if_up(ifp, true);
|
if_up(ifp, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Wake up configured address if it is not in current kernel
|
/* Wake up configured address if it is not in current kernel
|
||||||
address. */
|
address. */
|
||||||
|
|
|
@ -390,6 +390,7 @@ int if_unset_prefix_ctx(const struct zebra_dplane_ctx *ctx)
|
||||||
#endif /* HAVE_STRUCT_IFALIASREQ */
|
#endif /* HAVE_STRUCT_IFALIASREQ */
|
||||||
#endif /* HAVE_NETLINK */
|
#endif /* HAVE_NETLINK */
|
||||||
|
|
||||||
|
#ifndef HAVE_NETLINK
|
||||||
/* get interface flags */
|
/* get interface flags */
|
||||||
void if_get_flags(struct interface *ifp)
|
void if_get_flags(struct interface *ifp)
|
||||||
{
|
{
|
||||||
|
@ -485,6 +486,7 @@ void if_get_flags(struct interface *ifp)
|
||||||
out:
|
out:
|
||||||
if_flags_update(ifp, (ifreqflags.ifr_flags & 0x0000ffff));
|
if_flags_update(ifp, (ifreqflags.ifr_flags & 0x0000ffff));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Set interface flags */
|
/* Set interface flags */
|
||||||
int if_set_flags(struct interface *ifp, uint64_t flags)
|
int if_set_flags(struct interface *ifp, uint64_t flags)
|
||||||
|
|
Loading…
Reference in a new issue