2 * bgp_updgrp_adv.c: BGP update group advertisement and adjacency
6 * @copyright Copyright (C) 2014 Cumulus Networks, Inc.
8 * @author Avneesh Sachdev <avneesh@sproute.net>
9 * @author Rajesh Varadarajan <rajesh@sproute.net>
10 * @author Pradosh Mohapatra <pradosh@sproute.net>
12 * This file is part of GNU Zebra.
14 * GNU Zebra is free software; you can redistribute it and/or modify it
15 * under the terms of the GNU General Public License as published by the
16 * Free Software Foundation; either version 2, or (at your option) any
19 * GNU Zebra is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * General Public License for more details.
24 * You should have received a copy of the GNU General Public License along
25 * with this program; see the file COPYING; if not, write to the Free Software
26 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
40 #include "bgpd/bgpd.h"
41 #include "bgpd/bgp_table.h"
42 #include "bgpd/bgp_debug.h"
43 #include "bgpd/bgp_route.h"
44 #include "bgpd/bgp_advertise.h"
45 #include "bgpd/bgp_attr.h"
46 #include "bgpd/bgp_aspath.h"
47 #include "bgpd/bgp_packet.h"
48 #include "bgpd/bgp_fsm.h"
49 #include "bgpd/bgp_mplsvpn.h"
50 #include "bgpd/bgp_updgrp.h"
51 #include "bgpd/bgp_advertise.h"
58 static inline struct bgp_adj_out
*adj_lookup(struct bgp_node
*rn
,
59 struct update_subgroup
*subgrp
,
60 uint32_t addpath_tx_id
)
62 struct bgp_adj_out
*adj
;
71 peer
= SUBGRP_PEER(subgrp
);
72 afi
= SUBGRP_AFI(subgrp
);
73 safi
= SUBGRP_SAFI(subgrp
);
74 addpath_capable
= bgp_addpath_encode_tx(peer
, afi
, safi
);
76 /* update-groups that do not support addpath will pass 0 for
77 * addpath_tx_id so do not both matching against it */
78 for (adj
= rn
->adj_out
; adj
; adj
= adj
->next
) {
79 if (adj
->subgroup
== subgrp
) {
80 if (addpath_capable
) {
81 if (adj
->addpath_tx_id
== addpath_tx_id
) {
93 static void adj_free(struct bgp_adj_out
*adj
)
95 TAILQ_REMOVE(&(adj
->subgroup
->adjq
), adj
, subgrp_adj_train
);
96 SUBGRP_DECR_STAT(adj
->subgroup
, adj_count
);
97 XFREE(MTYPE_BGP_ADJ_OUT
, adj
);
100 static int group_announce_route_walkcb(struct update_group
*updgrp
, void *arg
)
102 struct updwalk_context
*ctx
= arg
;
103 struct update_subgroup
*subgrp
;
108 struct bgp_adj_out
*adj
, *adj_next
;
111 afi
= UPDGRP_AFI(updgrp
);
112 safi
= UPDGRP_SAFI(updgrp
);
113 peer
= UPDGRP_PEER(updgrp
);
114 addpath_capable
= bgp_addpath_encode_tx(peer
, afi
, safi
);
116 if (BGP_DEBUG(update
, UPDATE_OUT
)) {
117 char buf_prefix
[PREFIX_STRLEN
];
118 prefix2str(&ctx
->rn
->p
, buf_prefix
, sizeof(buf_prefix
));
119 zlog_debug("%s: afi=%s, safi=%s, p=%s", __func__
, afi2str(afi
),
120 safi2str(safi
), buf_prefix
);
124 UPDGRP_FOREACH_SUBGRP (updgrp
, subgrp
) {
127 * Skip the subgroups that have coalesce timer running. We will
128 * walk the entire prefix table for those subgroups when the
129 * coalesce timer fires.
131 if (!subgrp
->t_coalesce
) {
132 /* An update-group that uses addpath */
133 if (addpath_capable
) {
134 /* Look through all of the paths we have
135 * advertised for this rn and
136 * send a withdraw for the ones that are no
138 for (adj
= ctx
->rn
->adj_out
; adj
;
140 adj_next
= adj
->next
;
142 if (adj
->subgroup
== subgrp
) {
143 for (ri
= ctx
->rn
->info
; ri
;
145 if (ri
->addpath_tx_id
146 == adj
->addpath_tx_id
) {
152 subgroup_process_announce_selected(
160 for (ri
= ctx
->rn
->info
; ri
; ri
= ri
->next
) {
161 /* Skip the bestpath for now */
165 subgroup_process_announce_selected(
170 /* Process the bestpath last so the "show [ip]
171 * bgp neighbor x.x.x.x advertised"
172 * output shows the attributes from the bestpath
175 subgroup_process_announce_selected(
176 subgrp
, ctx
->ri
, ctx
->rn
,
177 ctx
->ri
->addpath_tx_id
);
180 /* An update-group that does not use addpath */
183 subgroup_process_announce_selected(
184 subgrp
, ctx
->ri
, ctx
->rn
,
185 ctx
->ri
->addpath_tx_id
);
187 /* Find the addpath_tx_id of the path we
190 for (adj
= ctx
->rn
->adj_out
; adj
;
192 adj_next
= adj
->next
;
194 if (adj
->subgroup
== subgrp
) {
195 subgroup_process_announce_selected(
206 return UPDWALK_CONTINUE
;
209 static void subgrp_show_adjq_vty(struct update_subgroup
*subgrp
,
210 struct vty
*vty
, uint8_t flags
)
212 struct bgp_table
*table
;
213 struct bgp_adj_out
*adj
;
214 unsigned long output_count
;
220 bgp
= SUBGRP_INST(subgrp
);
224 table
= bgp
->rib
[SUBGRP_AFI(subgrp
)][SUBGRP_SAFI(subgrp
)];
228 for (rn
= bgp_table_top(table
); rn
; rn
= bgp_route_next(rn
))
229 for (adj
= rn
->adj_out
; adj
; adj
= adj
->next
)
230 if (adj
->subgroup
== subgrp
) {
233 "BGP table version is %" PRIu64
234 ", local router ID is %s\n",
236 inet_ntoa(bgp
->router_id
));
237 vty_out(vty
, BGP_SHOW_SCODE_HEADER
);
238 vty_out(vty
, BGP_SHOW_OCODE_HEADER
);
242 vty_out(vty
, BGP_SHOW_HEADER
);
245 if ((flags
& UPDWALK_FLAGS_ADVQUEUE
) && adj
->adv
247 route_vty_out_tmp(vty
, &rn
->p
,
253 if ((flags
& UPDWALK_FLAGS_ADVERTISED
)
256 vty
, &rn
->p
, adj
->attr
,
257 SUBGRP_SAFI(subgrp
), 0, NULL
);
261 if (output_count
!= 0)
262 vty_out(vty
, "\nTotal number of prefixes %ld\n", output_count
);
265 static int updgrp_show_adj_walkcb(struct update_group
*updgrp
, void *arg
)
267 struct updwalk_context
*ctx
= arg
;
268 struct update_subgroup
*subgrp
;
272 UPDGRP_FOREACH_SUBGRP (updgrp
, subgrp
) {
273 if (ctx
->subgrp_id
&& (ctx
->subgrp_id
!= subgrp
->id
))
275 vty_out(vty
, "update group %" PRIu64
", subgroup %" PRIu64
"\n",
276 updgrp
->id
, subgrp
->id
);
277 subgrp_show_adjq_vty(subgrp
, vty
, ctx
->flags
);
279 return UPDWALK_CONTINUE
;
282 static void updgrp_show_adj(struct bgp
*bgp
, afi_t afi
, safi_t safi
,
283 struct vty
*vty
, uint64_t id
, uint8_t flags
)
285 struct updwalk_context ctx
;
286 memset(&ctx
, 0, sizeof(ctx
));
291 update_group_af_walk(bgp
, afi
, safi
, updgrp_show_adj_walkcb
, &ctx
);
294 static int subgroup_coalesce_timer(struct thread
*thread
)
296 struct update_subgroup
*subgrp
;
298 subgrp
= THREAD_ARG(thread
);
299 if (bgp_debug_update(NULL
, NULL
, subgrp
->update_group
, 0))
300 zlog_debug("u%" PRIu64
":s%" PRIu64
301 " announcing routes upon coalesce timer expiry",
302 (SUBGRP_UPDGRP(subgrp
))->id
, subgrp
->id
);
303 subgrp
->t_coalesce
= NULL
;
304 subgrp
->v_coalesce
= 0;
305 subgroup_announce_route(subgrp
);
308 /* While the announce_route() may kick off the route advertisement timer
310 * the members of the subgroup, we'd like to send the initial updates
312 * faster (i.e., without enforcing MRAI). Also, if there were no routes
314 * announce, this is the method currently employed to trigger the EOR.
316 if (!bgp_update_delay_active(SUBGRP_INST(subgrp
))) {
320 SUBGRP_FOREACH_PEER (subgrp
, paf
) {
321 peer
= PAF_PEER(paf
);
322 BGP_TIMER_OFF(peer
->t_routeadv
);
323 BGP_TIMER_ON(peer
->t_routeadv
, bgp_routeadv_timer
, 0);
330 static int update_group_announce_walkcb(struct update_group
*updgrp
, void *arg
)
332 struct update_subgroup
*subgrp
;
334 UPDGRP_FOREACH_SUBGRP (updgrp
, subgrp
) {
335 subgroup_announce_all(subgrp
);
338 return UPDWALK_CONTINUE
;
341 static int update_group_announce_rrc_walkcb(struct update_group
*updgrp
,
344 struct update_subgroup
*subgrp
;
349 afi
= UPDGRP_AFI(updgrp
);
350 safi
= UPDGRP_SAFI(updgrp
);
351 peer
= UPDGRP_PEER(updgrp
);
353 /* Only announce if this is a group of route-reflector-clients */
354 if (CHECK_FLAG(peer
->af_flags
[afi
][safi
], PEER_FLAG_REFLECTOR_CLIENT
)) {
355 UPDGRP_FOREACH_SUBGRP (updgrp
, subgrp
) {
356 subgroup_announce_all(subgrp
);
360 return UPDWALK_CONTINUE
;
363 /********************
365 ********************/
368 * Allocate an adj-out object. Do proper initialization of its fields,
369 * primarily its association with the subgroup and the prefix.
371 struct bgp_adj_out
*bgp_adj_out_alloc(struct update_subgroup
*subgrp
,
373 uint32_t addpath_tx_id
)
375 struct bgp_adj_out
*adj
;
377 adj
= XCALLOC(MTYPE_BGP_ADJ_OUT
, sizeof(struct bgp_adj_out
));
378 adj
->subgroup
= subgrp
;
380 BGP_ADJ_OUT_ADD(rn
, adj
);
385 adj
->addpath_tx_id
= addpath_tx_id
;
386 TAILQ_INSERT_TAIL(&(subgrp
->adjq
), adj
, subgrp_adj_train
);
387 SUBGRP_INCR_STAT(subgrp
, adj_count
);
392 struct bgp_advertise
*
393 bgp_advertise_clean_subgroup(struct update_subgroup
*subgrp
,
394 struct bgp_adj_out
*adj
)
396 struct bgp_advertise
*adv
;
397 struct bgp_advertise_attr
*baa
;
398 struct bgp_advertise
*next
;
399 struct bgp_advertise_fifo
*fhead
;
406 fhead
= &subgrp
->sync
->update
;
408 /* Unlink myself from advertise attribute FIFO. */
409 bgp_advertise_delete(baa
, adv
);
411 /* Fetch next advertise candidate. */
414 /* Unintern BGP advertise attribute. */
415 bgp_advertise_unintern(subgrp
->hash
, baa
);
417 fhead
= &subgrp
->sync
->withdraw
;
420 /* Unlink myself from advertisement FIFO. */
421 BGP_ADV_FIFO_DEL(fhead
, adv
);
424 bgp_advertise_free(adj
->adv
);
430 void bgp_adj_out_set_subgroup(struct bgp_node
*rn
,
431 struct update_subgroup
*subgrp
, struct attr
*attr
,
432 struct bgp_info
*binfo
)
434 struct bgp_adj_out
*adj
= NULL
;
435 struct bgp_advertise
*adv
;
437 if (DISABLE_BGP_ANNOUNCE
)
440 /* Look for adjacency information. */
441 adj
= adj_lookup(rn
, subgrp
, binfo
->addpath_tx_id
);
444 adj
= bgp_adj_out_alloc(subgrp
, rn
, binfo
->addpath_tx_id
);
450 bgp_advertise_clean_subgroup(subgrp
, adj
);
451 adj
->adv
= bgp_advertise_new();
455 assert(adv
->binfo
== NULL
);
456 adv
->binfo
= bgp_info_lock(binfo
); /* bgp_info adj_out reference */
459 adv
->baa
= bgp_advertise_intern(subgrp
->hash
, attr
);
461 adv
->baa
= baa_new();
464 /* Add new advertisement to advertisement attribute list. */
465 bgp_advertise_add(adv
->baa
, adv
);
468 * If the update adv list is empty, trigger the member peers'
469 * mrai timers so the socket writes can happen.
471 if (BGP_ADV_FIFO_EMPTY(&subgrp
->sync
->update
)) {
474 SUBGRP_FOREACH_PEER (subgrp
, paf
) {
475 bgp_adjust_routeadv(PAF_PEER(paf
));
479 BGP_ADV_FIFO_ADD(&subgrp
->sync
->update
, &adv
->fifo
);
481 subgrp
->version
= max(subgrp
->version
, rn
->version
);
484 /* The only time 'withdraw' will be false is if we are sending
485 * the "neighbor x.x.x.x default-originate" default and need to clear
486 * bgp_adj_out for the 0.0.0.0/0 route in the BGP table.
488 void bgp_adj_out_unset_subgroup(struct bgp_node
*rn
,
489 struct update_subgroup
*subgrp
, char withdraw
,
490 uint32_t addpath_tx_id
)
492 struct bgp_adj_out
*adj
;
493 struct bgp_advertise
*adv
;
496 if (DISABLE_BGP_ANNOUNCE
)
499 /* Lookup existing adjacency */
500 if ((adj
= adj_lookup(rn
, subgrp
, addpath_tx_id
)) != NULL
) {
501 /* Clean up previous advertisement. */
503 bgp_advertise_clean_subgroup(subgrp
, adj
);
505 if (adj
->attr
&& withdraw
) {
506 /* We need advertisement structure. */
507 adj
->adv
= bgp_advertise_new();
512 /* Note if we need to trigger a packet write */
514 BGP_ADV_FIFO_EMPTY(&subgrp
->sync
->withdraw
);
516 /* Add to synchronization entry for withdraw
518 BGP_ADV_FIFO_ADD(&subgrp
->sync
->withdraw
, &adv
->fifo
);
521 subgroup_trigger_write(subgrp
);
523 /* Remove myself from adjacency. */
524 BGP_ADJ_OUT_DEL(rn
, adj
);
526 /* Free allocated information. */
533 subgrp
->version
= max(subgrp
->version
, rn
->version
);
536 void bgp_adj_out_remove_subgroup(struct bgp_node
*rn
, struct bgp_adj_out
*adj
,
537 struct update_subgroup
*subgrp
)
540 bgp_attr_unintern(&adj
->attr
);
543 bgp_advertise_clean_subgroup(subgrp
, adj
);
545 BGP_ADJ_OUT_DEL(rn
, adj
);
550 * Go through all the routes and clean up the adj/adv structures corresponding
553 void subgroup_clear_table(struct update_subgroup
*subgrp
)
555 struct bgp_adj_out
*aout
, *taout
;
557 SUBGRP_FOREACH_ADJ_SAFE (subgrp
, aout
, taout
) {
558 struct bgp_node
*rn
= aout
->rn
;
559 bgp_adj_out_remove_subgroup(rn
, aout
, subgrp
);
565 * subgroup_announce_table
567 void subgroup_announce_table(struct update_subgroup
*subgrp
,
568 struct bgp_table
*table
)
578 peer
= SUBGRP_PEER(subgrp
);
579 afi
= SUBGRP_AFI(subgrp
);
580 safi
= SUBGRP_SAFI(subgrp
);
581 addpath_capable
= bgp_addpath_encode_tx(peer
, afi
, safi
);
583 if (safi
== SAFI_LABELED_UNICAST
)
587 table
= peer
->bgp
->rib
[afi
][safi
];
589 if (safi
!= SAFI_MPLS_VPN
&& safi
!= SAFI_ENCAP
&& safi
!= SAFI_EVPN
590 && CHECK_FLAG(peer
->af_flags
[afi
][safi
],
591 PEER_FLAG_DEFAULT_ORIGINATE
))
592 subgroup_default_originate(subgrp
, 0);
594 for (rn
= bgp_table_top(table
); rn
; rn
= bgp_route_next(rn
))
595 for (ri
= rn
->info
; ri
; ri
= ri
->next
)
597 if (CHECK_FLAG(ri
->flags
, BGP_INFO_SELECTED
)
599 && bgp_addpath_tx_path(peer
, afi
, safi
, ri
))) {
600 if (subgroup_announce_check(rn
, ri
, subgrp
,
602 bgp_adj_out_set_subgroup(rn
, subgrp
,
605 bgp_adj_out_unset_subgroup(
611 * We walked through the whole table -- make sure our version number
612 * is consistent with the one on the table. This should allow
613 * subgroups to merge sooner if a peer comes up when the route node
614 * with the largest version is no longer in the table. This also
615 * covers the pathological case where all routes in the table have
618 subgrp
->version
= max(subgrp
->version
, table
->version
);
621 * Start a task to merge the subgroup if necessary.
623 update_subgroup_trigger_merge_check(subgrp
, 0);
627 * subgroup_announce_route
629 * Refresh all routes out to a subgroup.
631 void subgroup_announce_route(struct update_subgroup
*subgrp
)
634 struct bgp_table
*table
;
635 struct peer
*onlypeer
;
637 if (update_subgroup_needs_refresh(subgrp
)) {
638 update_subgroup_set_needs_refresh(subgrp
, 0);
642 * First update is deferred until ORF or ROUTE-REFRESH is received
644 onlypeer
= ((SUBGRP_PCOUNT(subgrp
) == 1) ? (SUBGRP_PFIRST(subgrp
))->peer
646 if (onlypeer
&& CHECK_FLAG(onlypeer
->af_sflags
[SUBGRP_AFI(subgrp
)]
647 [SUBGRP_SAFI(subgrp
)],
648 PEER_STATUS_ORF_WAIT_REFRESH
))
651 if (SUBGRP_SAFI(subgrp
) != SAFI_MPLS_VPN
652 && SUBGRP_SAFI(subgrp
) != SAFI_ENCAP
653 && SUBGRP_SAFI(subgrp
) != SAFI_EVPN
)
654 subgroup_announce_table(subgrp
, NULL
);
656 for (rn
= bgp_table_top(update_subgroup_rib(subgrp
)); rn
;
657 rn
= bgp_route_next(rn
))
658 if ((table
= (rn
->info
)) != NULL
)
659 subgroup_announce_table(subgrp
, table
);
662 void subgroup_default_originate(struct update_subgroup
*subgrp
, int withdraw
)
666 struct bgp_info
*info
, init_info
, tmp_info
;
672 int ret
= RMAP_DENYMATCH
;
679 peer
= SUBGRP_PEER(subgrp
);
680 afi
= SUBGRP_AFI(subgrp
);
681 safi
= SUBGRP_SAFI(subgrp
);
683 if (!(afi
== AFI_IP
|| afi
== AFI_IP6
))
687 from
= bgp
->peer_self
;
689 bgp_attr_default_set(&attr
, BGP_ORIGIN_IGP
);
690 attr
.local_pref
= bgp
->default_local_pref
;
692 if ((afi
== AFI_IP6
) || peer_cap_enhe(peer
, afi
, safi
)) {
693 /* IPv6 global nexthop must be included.
695 attr
.mp_nexthop_len
= BGP_ATTR_NHLEN_IPV6_GLOBAL
;
697 /* If the peer is on shared nextwork and
698 * we have link-local nexthop set it. */
699 if (peer
->shared_network
700 && !IN6_IS_ADDR_UNSPECIFIED(&peer
->nexthop
.v6_local
))
701 attr
.mp_nexthop_len
= BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL
;
703 init_info
.attr
= &attr
;
705 bgp_attr_intern(info
->attr
);
707 memset(&p
, 0, sizeof(p
));
708 p
.family
= afi2family(afi
);
711 if (peer
->default_rmap
[afi
][safi
].name
) {
712 SET_FLAG(bgp
->peer_self
->rmap_type
, PEER_RMAP_TYPE_DEFAULT
);
713 for (rn
= bgp_table_top(bgp
->rib
[afi
][safi
]); rn
;
714 rn
= bgp_route_next(rn
)) {
715 for (ri
= rn
->info
; ri
; ri
= ri
->next
) {
716 tmp_info
.peer
= ri
->peer
;
717 tmp_info
.attr
= ri
->attr
;
719 /* Reset attributes every time to avoid \
720 * unexpected as-path prepends */
721 bgp_attr_default_set(tmp_info
.attr
,
725 || peer_cap_enhe(peer
, afi
, safi
)) {
726 tmp_info
.attr
->mp_nexthop_len
=
727 BGP_ATTR_NHLEN_IPV6_GLOBAL
;
729 if (peer
->shared_network
730 && !IN6_IS_ADDR_UNSPECIFIED(
731 &peer
->nexthop
.v6_local
))
732 tmp_info
.attr
->mp_nexthop_len
=
733 BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL
;
736 ret
= route_map_apply(
737 peer
->default_rmap
[afi
][safi
].map
,
738 &rn
->p
, RMAP_BGP
, &tmp_info
);
741 bgp_attr_intern(info
->attr
);
743 if (ret
!= RMAP_DENYMATCH
)
746 if (ret
!= RMAP_DENYMATCH
)
749 bgp
->peer_self
->rmap_type
= 0;
751 if (ret
== RMAP_DENYMATCH
)
756 if (CHECK_FLAG(subgrp
->sflags
, SUBGRP_STATUS_DEFAULT_ORIGINATE
))
757 subgroup_default_withdraw_packet(subgrp
);
758 UNSET_FLAG(subgrp
->sflags
, SUBGRP_STATUS_DEFAULT_ORIGINATE
);
760 if (!CHECK_FLAG(subgrp
->sflags
,
761 SUBGRP_STATUS_DEFAULT_ORIGINATE
)) {
763 if (bgp_flag_check(bgp
, BGP_FLAG_GRACEFUL_SHUTDOWN
)) {
764 bgp_attr_add_gshut_community(info
->attr
);
767 SET_FLAG(subgrp
->sflags
,
768 SUBGRP_STATUS_DEFAULT_ORIGINATE
);
769 subgroup_default_update_packet(subgrp
, info
->attr
,
772 /* The 'neighbor x.x.x.x default-originate' default will
774 * implicit withdraw for any previous UPDATEs sent for
776 * clear adj_out for the 0.0.0.0/0 prefix in the BGP
779 memset(&p
, 0, sizeof(p
));
780 p
.family
= afi2family(afi
);
783 rn
= bgp_afi_node_get(bgp
->rib
[afi
][safi
], afi
, safi
,
785 bgp_adj_out_unset_subgroup(
787 BGP_ADDPATH_TX_ID_FOR_DEFAULT_ORIGINATE
);
790 aspath_unintern(&info
->attr
->aspath
);
794 * Announce the BGP table to a subgroup.
796 * At startup, we try to optimize route announcement by coalescing the
797 * peer-up events. This is done only the first time - from then on,
798 * subgrp->v_coalesce will be set to zero and the normal logic
801 void subgroup_announce_all(struct update_subgroup
*subgrp
)
807 * If coalesce timer value is not set, announce routes immediately.
809 if (!subgrp
->v_coalesce
) {
810 if (bgp_debug_update(NULL
, NULL
, subgrp
->update_group
, 0))
811 zlog_debug("u%" PRIu64
":s%" PRIu64
812 " announcing all routes",
813 subgrp
->update_group
->id
, subgrp
->id
);
814 subgroup_announce_route(subgrp
);
819 * We should wait for the coalesce timer. Arm the timer if not done.
821 if (!subgrp
->t_coalesce
) {
822 thread_add_timer_msec(bm
->master
, subgroup_coalesce_timer
,
823 subgrp
, subgrp
->v_coalesce
,
824 &subgrp
->t_coalesce
);
829 * Go through all update subgroups and set up the adv queue for the
832 void group_announce_route(struct bgp
*bgp
, afi_t afi
, safi_t safi
,
833 struct bgp_node
*rn
, struct bgp_info
*ri
)
835 struct updwalk_context ctx
;
838 update_group_af_walk(bgp
, afi
, safi
, group_announce_route_walkcb
, &ctx
);
841 void update_group_show_adj_queue(struct bgp
*bgp
, afi_t afi
, safi_t safi
,
842 struct vty
*vty
, uint64_t id
)
844 updgrp_show_adj(bgp
, afi
, safi
, vty
, id
, UPDWALK_FLAGS_ADVQUEUE
);
847 void update_group_show_advertised(struct bgp
*bgp
, afi_t afi
, safi_t safi
,
848 struct vty
*vty
, uint64_t id
)
850 updgrp_show_adj(bgp
, afi
, safi
, vty
, id
, UPDWALK_FLAGS_ADVERTISED
);
853 void update_group_announce(struct bgp
*bgp
)
855 update_group_walk(bgp
, update_group_announce_walkcb
, NULL
);
858 void update_group_announce_rrclients(struct bgp
*bgp
)
860 update_group_walk(bgp
, update_group_announce_rrc_walkcb
, NULL
);