summaryrefslogtreecommitdiff
path: root/bgpd/bgp_fsm.h
diff options
context:
space:
mode:
authorSoman K S <somanks@gmail.com>2020-11-06 08:55:56 +0530
committerSoman K S <somanks@gmail.com>2020-11-06 08:55:56 +0530
commita77e2f4bab740cf959c8f3c41694954df6f7e7ca (patch)
tree8cbb2887d0a1679c49207fd10b6742131ba1ae70 /bgpd/bgp_fsm.h
parentc208c58670a3de2078fce343fed9a70e5b014690 (diff)
bgpd: Advertise FIB installed routes to bgp peers (Part 3)
* Process FIB update in bgp_zebra_route_notify_owner() and call group_announce_route() if route is installed * When bgp update is received for a route which is not installed earlier (flag BGP_NODE_FIB_INSTALLED is not set) and suppress fib is enabled set the flag BGP_NODE_FIB_INSTALL_PENDING to indicate fib install is pending for the route. The route will be advertised when zebra send ZAPI_ROUTE_INSTALLED status. * The advertisement delay (BGP_DEFAULT_UPDATE_ADVERTISEMENT_TIME) is added to allow more routes to be sent in single update message. This is required since zebra sends route notify message for each route. The delay will be applied to update group timer which advertises routes to peers. Signed-off-by: kssoman <somanks@gmail.com>
Diffstat (limited to 'bgpd/bgp_fsm.h')
-rw-r--r--bgpd/bgp_fsm.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/bgpd/bgp_fsm.h b/bgpd/bgp_fsm.h
index b9156df617..cd464d8c58 100644
--- a/bgpd/bgp_fsm.h
+++ b/bgpd/bgp_fsm.h
@@ -47,6 +47,18 @@
thread_cancel_event(bm->master, (P)); \
} while (0)
+#define BGP_UPDATE_GROUP_TIMER_ON(T, F) \
+ do { \
+ if (BGP_SUPPRESS_FIB_ENABLED(peer->bgp) && \
+ PEER_ROUTE_ADV_DELAY(peer)) \
+ thread_add_timer_msec(bm->master, (F), peer, \
+ (BGP_DEFAULT_UPDATE_ADVERTISEMENT_TIME * 1000),\
+ T); \
+ else \
+ thread_add_timer_msec(bm->master, (F), peer, \
+ 0, T); \
+ } while (0) \
+
#define BGP_MSEC_JITTER 10
/* Status codes for bgp_event_update() */