From 39a6ffb4d4f06251c0784986d9a2e2297a6bb2e9 Mon Sep 17 00:00:00 2001 From: claudio Date: Mon, 21 Mar 2022 10:15:34 +0000 Subject: [PATCH] Rename F_CTL_ACTIVE and F_PREF_ACTIVE to the more correct F_CTL_BEST and F_PREF_BEST. This is used to mark the one best path in bgpctl. When ECMP support is added then more then one path can be active. OK tb@ --- usr.sbin/bgpd/bgpd.h | 6 +++--- usr.sbin/bgpd/rde.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h index a88b251baba..8e77df00802 100644 --- a/usr.sbin/bgpd/bgpd.h +++ b/usr.sbin/bgpd/bgpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.h,v 1.421 2022/03/03 11:19:41 claudio Exp $ */ +/* $OpenBSD: bgpd.h,v 1.422 2022/03/21 10:15:34 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -89,7 +89,7 @@ #define F_CTL_DETAIL 0x1000 /* only set on requests */ #define F_CTL_ADJ_IN 0x2000 /* only set on requests */ #define F_CTL_ADJ_OUT 0x4000 /* only set on requests */ -#define F_CTL_ACTIVE 0x8000 +#define F_CTL_BEST 0x8000 #define F_RTLABEL 0x10000 #define F_CTL_SSV 0x20000 /* only used by bgpctl */ #define F_CTL_INVALID 0x40000 /* only set on requests */ @@ -790,7 +790,7 @@ struct ctl_neighbor { }; #define F_PREF_ELIGIBLE 0x01 -#define F_PREF_ACTIVE 0x02 +#define F_PREF_BEST 0x02 #define F_PREF_INTERNAL 0x04 #define F_PREF_ANNOUNCE 0x08 #define F_PREF_STALE 0x10 diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index eee51476fe5..e178fc43668 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.540 2022/03/03 13:06:15 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.541 2022/03/21 10:15:34 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -2401,7 +2401,7 @@ rde_dump_rib_as(struct prefix *p, struct rde_aspath *asp, pid_t pid, int flags, rib.flags = 0; re = prefix_re(p); if (re != NULL && re->active == p) - rib.flags |= F_PREF_ACTIVE; + rib.flags |= F_PREF_BEST; if (!peer->conf.ebgp) rib.flags |= F_PREF_INTERNAL; if (asp->flags & F_PREFIX_ANNOUNCED) @@ -2502,7 +2502,7 @@ rde_dump_filter(struct prefix *p, struct ctl_show_rib_request *req, int adjout) re = prefix_re(p); if (asp == NULL) /* skip pending withdraw in Adj-RIB-Out */ return; - if ((req->flags & F_CTL_ACTIVE) && re != NULL && re->active != p) + if ((req->flags & F_CTL_BEST) && re != NULL && re->active != p) return; if ((req->flags & F_CTL_INVALID) && (asp->flags & F_ATTR_PARSE_ERR) == 0) -- 2.20.1