summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde.h
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2019-10-30 05:27:51 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2019-10-30 05:27:51 +0000
commitdb68f5d83f1129f89e73ba863bbb4b7bd1f43199 (patch)
tree0ef6e12d16b5f52813f6570abde38b2bbbf4a84d /usr.sbin/bgpd/rde.h
parent5ed9a03677773b91c937c7955644124f85ed5356 (diff)
Add PREFIX_FLAG_STALE to mark prefixes in the Adj-RIB-Out as stale during
graceful reload. At the same time extend peer_dump() to force all updates getting sent by adding every entry in the Adj-RIB-Out to the update tree unless they are PREFIX_FLAG_DEAD or PREFIX_FLAG_STALE. The latter will be removed during that stage since peer_dump() just did a full update of the Adj-RIB-Out. Also fix prefix_withdraw to check the correct prefix flags before removing a prefix from the update or withdraw tree. OK benno@
Diffstat (limited to 'usr.sbin/bgpd/rde.h')
-rw-r--r--usr.sbin/bgpd/rde.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/bgpd/rde.h b/usr.sbin/bgpd/rde.h
index 3faaa61a6dd..d01097b02d4 100644
--- a/usr.sbin/bgpd/rde.h
+++ b/usr.sbin/bgpd/rde.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.h,v 1.226 2019/08/14 11:57:21 claudio Exp $ */
+/* $OpenBSD: rde.h,v 1.227 2019/10/30 05:27:50 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> and
@@ -324,10 +324,11 @@ struct prefix {
u_int8_t nhflags;
u_int8_t eor;
u_int8_t flags;
-#define PREFIX_FLAG_WITHDRAW 0x01 /* queued for withdraw */
-#define PREFIX_FLAG_UPDATE 0x02 /* queued for update */
+#define PREFIX_FLAG_WITHDRAW 0x01 /* enqueued on withdraw queue */
+#define PREFIX_FLAG_UPDATE 0x02 /* enqueued on update queue */
#define PREFIX_FLAG_DEAD 0x04 /* locked but removed */
-#define PREFIX_FLAG_MASK 0x07 /* mask for the three prefix types */
+#define PREFIX_FLAG_STALE 0x08 /* stale entry (graceful reload) */
+#define PREFIX_FLAG_MASK 0x0f /* mask for the prefix types */
#define PREFIX_NEXTHOP_LINKED 0x40 /* prefix is linked onto nexthop list */
#define PREFIX_FLAG_LOCKED 0x80 /* locked by rib walker */
};