summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bgpd/rde.h
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2019-06-20 13:18:19 +0000
committerclaudio <claudio@openbsd.org>2019-06-20 13:18:19 +0000
commit3f1c635632219903ee6e32286ec5f0a2de5127b5 (patch)
treee972bb7498bfbdf91f45e88ea8a6577dc0c87b87 /usr.sbin/bgpd/rde.h
parenttweaks with help from jmc@ (diff)
downloadwireguard-openbsd-3f1c635632219903ee6e32286ec5f0a2de5127b5.tar.xz
wireguard-openbsd-3f1c635632219903ee6e32286ec5f0a2de5127b5.zip
Change nexthop_update to run the list walk over all prefixes to run
asynchronously and therefor other tasks can make progress at the same time. Additionally prefixes belonging to a RIB which does not run the the decision process are no longer linked into the nexthop list. This replaces the early return in prefix_updateall() and reduces the time spent in nexthop_update(). OK benno@
Diffstat (limited to 'usr.sbin/bgpd/rde.h')
-rw-r--r--usr.sbin/bgpd/rde.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/rde.h b/usr.sbin/bgpd/rde.h
index 36fff8e2bf3..834acfbab9a 100644
--- a/usr.sbin/bgpd/rde.h
+++ b/usr.sbin/bgpd/rde.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.h,v 1.214 2019/06/17 13:35:43 claudio Exp $ */
+/* $OpenBSD: rde.h,v 1.215 2019/06/20 13:18:19 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> and
@@ -228,12 +228,15 @@ struct rde_aspath {
enum nexthop_state {
NEXTHOP_LOOKUP,
NEXTHOP_UNREACH,
- NEXTHOP_REACH
+ NEXTHOP_REACH,
+ NEXTHOP_FLAPPED
};
struct nexthop {
LIST_ENTRY(nexthop) nexthop_l;
+ TAILQ_ENTRY(nexthop) runner_l;
struct prefix_list prefix_h;
+ struct prefix *next_prefix;
struct bgpd_addr exit_nexthop;
struct bgpd_addr true_nexthop;
struct bgpd_addr nexthop_net;
@@ -246,6 +249,7 @@ struct nexthop {
#endif
int refcnt;
enum nexthop_state state;
+ enum nexthop_state oldstate;
u_int8_t nexthop_netlen;
u_int8_t flags;
#define NEXTHOP_CONNECTED 0x01
@@ -593,6 +597,8 @@ prefix_vstate(struct prefix *p)
void nexthop_init(u_int32_t);
void nexthop_shutdown(void);
+int nexthop_pending(void);
+void nexthop_runner(void);
void nexthop_modify(struct nexthop *, enum action_types, u_int8_t,
struct nexthop **, u_int8_t *);
void nexthop_link(struct prefix *);