mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-26 04:54:44 +00:00
Merge pull request #15815 from donaldsharp/blackhole_reinstall
lib, zebra: Check for not being a blackhole route
This commit is contained in:
commit
a4e60f3399
@ -1150,11 +1150,7 @@ static ssize_t printfrr_nh(struct fbuf *buf, struct printfrr_eargs *ea,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool nexthop_is_ifindex_type(const struct nexthop *nh)
|
bool nexthop_is_blackhole(const struct nexthop *nh)
|
||||||
{
|
{
|
||||||
if (nh->type == NEXTHOP_TYPE_IFINDEX ||
|
return nh->type == NEXTHOP_TYPE_BLACKHOLE;
|
||||||
nh->type == NEXTHOP_TYPE_IPV4_IFINDEX ||
|
|
||||||
nh->type == NEXTHOP_TYPE_IPV6_IFINDEX)
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
@ -240,8 +240,8 @@ extern struct nexthop *nexthop_dup(const struct nexthop *nexthop,
|
|||||||
extern struct nexthop *nexthop_dup_no_recurse(const struct nexthop *nexthop,
|
extern struct nexthop *nexthop_dup_no_recurse(const struct nexthop *nexthop,
|
||||||
struct nexthop *rparent);
|
struct nexthop *rparent);
|
||||||
|
|
||||||
/* Check nexthop of IFINDEX type */
|
/* Is this nexthop a blackhole? */
|
||||||
extern bool nexthop_is_ifindex_type(const struct nexthop *nh);
|
extern bool nexthop_is_blackhole(const struct nexthop *nh);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parse one or more backup index values, as comma-separated numbers,
|
* Parse one or more backup index values, as comma-separated numbers,
|
||||||
|
@ -3664,8 +3664,9 @@ void zebra_interface_nhg_reinstall(struct interface *ifp)
|
|||||||
"%s: Setting the valid flag for nhe %pNG, interface: %s",
|
"%s: Setting the valid flag for nhe %pNG, interface: %s",
|
||||||
__func__, rb_node_dep->nhe, ifp->name);
|
__func__, rb_node_dep->nhe, ifp->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for singleton NHG associated to interface */
|
/* Check for singleton NHG associated to interface */
|
||||||
if (nexthop_is_ifindex_type(nh) &&
|
if (!nexthop_is_blackhole(nh) &&
|
||||||
zebra_nhg_depends_is_empty(rb_node_dep->nhe)) {
|
zebra_nhg_depends_is_empty(rb_node_dep->nhe)) {
|
||||||
struct nhg_connected *rb_node_dependent;
|
struct nhg_connected *rb_node_dependent;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user