diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2022-07-11 16:51:02 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2022-07-11 16:51:02 +0000 |
commit | 81bb1204403e620c91969edf04cc96dc058cf1fa (patch) | |
tree | 4100cb22a8e3ef3cf140e04b8902a4ba0c0b9f4f | |
parent | 802dfbb81a17e1ece54d7ce31798325559b56006 (diff) |
When dumping prefixes for bgpctl just use prefix_eligible() to know if
a prefix is eligible / valid.
OK tb@
-rw-r--r-- | usr.sbin/bgpd/rde.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 0e34027b132..25f600e6a6d 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.552 2022/07/08 08:11:25 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.553 2022/07/11 16:51:01 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -2526,10 +2526,8 @@ rde_dump_rib_as(struct prefix *p, struct rde_aspath *asp, pid_t pid, int flags, rib.flags |= F_PREF_INTERNAL; if (asp->flags & F_PREFIX_ANNOUNCED) rib.flags |= F_PREF_ANNOUNCE; - if (nexthop == NULL || nexthop->state == NEXTHOP_REACH) + if (prefix_eligible(p)) rib.flags |= F_PREF_ELIGIBLE; - if (asp->flags & F_ATTR_LOOP) - rib.flags &= ~F_PREF_ELIGIBLE; /* otc loop includes parse err so skip the latter if the first is set */ if (asp->flags & F_ATTR_OTC_LOOP) rib.flags |= F_PREF_OTC_LOOP; |