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
*
59 adj_lookup (struct bgp_node
*rn
, struct update_subgroup
*subgrp
,
60 u_int32_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
)
80 if (adj
->subgroup
== subgrp
)
84 if (adj
->addpath_tx_id
== addpath_tx_id
)
100 adj_free (struct bgp_adj_out
*adj
)
102 TAILQ_REMOVE (&(adj
->subgroup
->adjq
), adj
, subgrp_adj_train
);
103 SUBGRP_DECR_STAT (adj
->subgroup
, adj_count
);
104 XFREE (MTYPE_BGP_ADJ_OUT
, adj
);
108 group_announce_route_walkcb (struct update_group
*updgrp
, void *arg
)
110 struct updwalk_context
*ctx
= arg
;
111 struct update_subgroup
*subgrp
;
116 struct bgp_adj_out
*adj
, *adj_next
;
119 afi
= UPDGRP_AFI (updgrp
);
120 safi
= UPDGRP_SAFI (updgrp
);
121 peer
= UPDGRP_PEER (updgrp
);
122 addpath_capable
= bgp_addpath_encode_tx (peer
, afi
, safi
);
124 UPDGRP_FOREACH_SUBGRP (updgrp
, subgrp
)
128 * Skip the subgroups that have coalesce timer running. We will
129 * walk the entire prefix table for those subgroups when the
130 * coalesce timer fires.
132 if (!subgrp
->t_coalesce
)
134 /* An update-group that uses addpath */
137 /* Look through all of the paths we have advertised for this rn and
138 * send a withdraw for the ones that are no longer present */
139 for (adj
= ctx
->rn
->adj_out
; adj
; adj
= adj_next
)
141 adj_next
= adj
->next
;
143 if (adj
->subgroup
== subgrp
)
145 for (ri
= ctx
->rn
->info
; ri
; ri
= ri
->next
)
147 if (ri
->addpath_tx_id
== adj
->addpath_tx_id
)
155 subgroup_process_announce_selected (subgrp
, NULL
, ctx
->rn
, adj
->addpath_tx_id
);
160 for (ri
= ctx
->rn
->info
; ri
; ri
= ri
->next
)
162 /* Skip the bestpath for now */
166 subgroup_process_announce_selected (subgrp
, ri
, ctx
->rn
, ri
->addpath_tx_id
);
169 /* Process the bestpath last so the "show [ip] bgp neighbor x.x.x.x advertised"
170 * output shows the attributes from the bestpath */
172 subgroup_process_announce_selected (subgrp
, ctx
->ri
, ctx
->rn
, ctx
->ri
->addpath_tx_id
);
175 /* An update-group that does not use addpath */
180 subgroup_process_announce_selected (subgrp
, ctx
->ri
, ctx
->rn
, ctx
->ri
->addpath_tx_id
);
184 /* Find the addpath_tx_id of the path we had advertised and
186 for (adj
= ctx
->rn
->adj_out
; adj
; adj
= adj_next
)
188 adj_next
= adj
->next
;
190 if (adj
->subgroup
== subgrp
)
192 subgroup_process_announce_selected (subgrp
, NULL
, ctx
->rn
, adj
->addpath_tx_id
);
200 return UPDWALK_CONTINUE
;
204 subgrp_show_adjq_vty (struct update_subgroup
*subgrp
, struct vty
*vty
,
207 struct bgp_table
*table
;
208 struct bgp_adj_out
*adj
;
209 unsigned long output_count
;
215 bgp
= SUBGRP_INST (subgrp
);
219 table
= bgp
->rib
[SUBGRP_AFI (subgrp
)][SUBGRP_SAFI (subgrp
)];
223 for (rn
= bgp_table_top (table
); rn
; rn
= bgp_route_next (rn
))
224 for (adj
= rn
->adj_out
; adj
; adj
= adj
->next
)
225 if (adj
->subgroup
== subgrp
)
230 "BGP table version is %" PRIu64
", local router ID is %s%s",
231 table
->version
, inet_ntoa (bgp
->router_id
),
233 vty_out (vty
, BGP_SHOW_SCODE_HEADER
, VTY_NEWLINE
, VTY_NEWLINE
);
234 vty_out (vty
, BGP_SHOW_OCODE_HEADER
, VTY_NEWLINE
, VTY_NEWLINE
);
239 vty_out (vty
, BGP_SHOW_HEADER
, VTY_NEWLINE
);
242 if ((flags
& UPDWALK_FLAGS_ADVQUEUE
) && adj
->adv
&& adj
->adv
->baa
)
244 route_vty_out_tmp (vty
, &rn
->p
, adj
->adv
->baa
->attr
, SUBGRP_SAFI (subgrp
), 0, NULL
);
247 if ((flags
& UPDWALK_FLAGS_ADVERTISED
) && adj
->attr
)
249 route_vty_out_tmp (vty
, &rn
->p
, adj
->attr
, SUBGRP_SAFI (subgrp
), 0, NULL
);
253 if (output_count
!= 0)
254 vty_out (vty
, "%sTotal number of prefixes %ld%s",
255 VTY_NEWLINE
, output_count
, VTY_NEWLINE
);
259 updgrp_show_adj_walkcb (struct update_group
*updgrp
, void *arg
)
261 struct updwalk_context
*ctx
= arg
;
262 struct update_subgroup
*subgrp
;
266 UPDGRP_FOREACH_SUBGRP (updgrp
, subgrp
)
268 if (ctx
->subgrp_id
&& (ctx
->subgrp_id
!= subgrp
->id
))
270 vty_out (vty
, "update group %" PRIu64
", subgroup %" PRIu64
"%s", updgrp
->id
,
271 subgrp
->id
, VTY_NEWLINE
);
272 subgrp_show_adjq_vty (subgrp
, vty
, ctx
->flags
);
274 return UPDWALK_CONTINUE
;
278 updgrp_show_adj (struct bgp
*bgp
, afi_t afi
, safi_t safi
,
279 struct vty
*vty
, uint64_t id
, u_int8_t flags
)
281 struct updwalk_context ctx
;
282 memset (&ctx
, 0, sizeof (ctx
));
287 update_group_af_walk (bgp
, afi
, safi
, updgrp_show_adj_walkcb
, &ctx
);
291 subgroup_coalesce_timer (struct thread
*thread
)
293 struct update_subgroup
*subgrp
;
295 subgrp
= THREAD_ARG (thread
);
296 if (bgp_debug_update(NULL
, NULL
, subgrp
->update_group
, 0))
297 zlog_debug ("u%" PRIu64
":s%" PRIu64
" announcing routes upon coalesce timer expiry",
298 (SUBGRP_UPDGRP (subgrp
))->id
, subgrp
->id
);
299 subgrp
->t_coalesce
= NULL
;
300 subgrp
->v_coalesce
= 0;
301 subgroup_announce_route (subgrp
);
304 /* While the announce_route() may kick off the route advertisement timer for
305 * the members of the subgroup, we'd like to send the initial updates much
306 * faster (i.e., without enforcing MRAI). Also, if there were no routes to
307 * announce, this is the method currently employed to trigger the EOR.
309 if (!bgp_update_delay_active(SUBGRP_INST(subgrp
)))
314 SUBGRP_FOREACH_PEER (subgrp
, paf
)
316 peer
= PAF_PEER(paf
);
317 BGP_TIMER_OFF(peer
->t_routeadv
);
318 BGP_TIMER_ON (peer
->t_routeadv
, bgp_routeadv_timer
, 0);
326 update_group_announce_walkcb (struct update_group
*updgrp
, void *arg
)
328 struct update_subgroup
*subgrp
;
330 UPDGRP_FOREACH_SUBGRP (updgrp
, subgrp
)
332 subgroup_announce_all (subgrp
);
335 return UPDWALK_CONTINUE
;
339 update_group_announce_rrc_walkcb (struct update_group
*updgrp
, void *arg
)
341 struct update_subgroup
*subgrp
;
346 afi
= UPDGRP_AFI (updgrp
);
347 safi
= UPDGRP_SAFI (updgrp
);
348 peer
= UPDGRP_PEER (updgrp
);
350 /* Only announce if this is a group of route-reflector-clients */
351 if (CHECK_FLAG(peer
->af_flags
[afi
][safi
], PEER_FLAG_REFLECTOR_CLIENT
))
353 UPDGRP_FOREACH_SUBGRP (updgrp
, subgrp
)
355 subgroup_announce_all (subgrp
);
359 return UPDWALK_CONTINUE
;
362 /********************
364 ********************/
367 * Allocate an adj-out object. Do proper initialization of its fields,
368 * primarily its association with the subgroup and the prefix.
371 bgp_adj_out_alloc (struct update_subgroup
*subgrp
, struct bgp_node
*rn
,
372 u_int32_t addpath_tx_id
)
374 struct bgp_adj_out
*adj
;
376 adj
= XCALLOC (MTYPE_BGP_ADJ_OUT
, sizeof (struct bgp_adj_out
));
377 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
;
407 fhead
= &subgrp
->sync
->update
;
409 /* Unlink myself from advertise attribute FIFO. */
410 bgp_advertise_delete (baa
, adv
);
412 /* Fetch next advertise candidate. */
415 /* Unintern BGP advertise attribute. */
416 bgp_advertise_unintern (subgrp
->hash
, baa
);
419 fhead
= &subgrp
->sync
->withdraw
;
422 /* Unlink myself from advertisement FIFO. */
423 BGP_ADV_FIFO_DEL (fhead
, adv
);
426 bgp_advertise_free (adj
->adv
);
433 bgp_adj_out_set_subgroup (struct bgp_node
*rn
,
434 struct update_subgroup
*subgrp
,
435 struct attr
*attr
, struct bgp_info
*binfo
)
437 struct bgp_adj_out
*adj
= NULL
;
438 struct bgp_advertise
*adv
;
440 if (DISABLE_BGP_ANNOUNCE
)
443 /* Look for adjacency information. */
444 adj
= adj_lookup (rn
, subgrp
, binfo
->addpath_tx_id
);
448 adj
= bgp_adj_out_alloc (subgrp
, rn
, binfo
->addpath_tx_id
);
454 bgp_advertise_clean_subgroup (subgrp
, adj
);
455 adj
->adv
= bgp_advertise_new ();
459 assert (adv
->binfo
== NULL
);
460 adv
->binfo
= bgp_info_lock (binfo
); /* bgp_info adj_out reference */
463 adv
->baa
= bgp_advertise_intern (subgrp
->hash
, attr
);
465 adv
->baa
= baa_new ();
468 /* Add new advertisement to advertisement attribute list. */
469 bgp_advertise_add (adv
->baa
, adv
);
472 * If the update adv list is empty, trigger the member peers'
473 * mrai timers so the socket writes can happen.
475 if (BGP_ADV_FIFO_EMPTY (&subgrp
->sync
->update
))
479 SUBGRP_FOREACH_PEER (subgrp
, paf
)
481 bgp_adjust_routeadv (PAF_PEER (paf
));
485 BGP_ADV_FIFO_ADD (&subgrp
->sync
->update
, &adv
->fifo
);
487 subgrp
->version
= max (subgrp
->version
, rn
->version
);
490 /* The only time 'withdraw' will be false is if we are sending
491 * the "neighbor x.x.x.x default-originate" default and need to clear
492 * bgp_adj_out for the 0.0.0.0/0 route in the BGP table.
495 bgp_adj_out_unset_subgroup (struct bgp_node
*rn
,
496 struct update_subgroup
*subgrp
,
498 u_int32_t addpath_tx_id
)
500 struct bgp_adj_out
*adj
;
501 struct bgp_advertise
*adv
;
504 if (DISABLE_BGP_ANNOUNCE
)
507 /* Lookup existing adjacency */
508 if ((adj
= adj_lookup (rn
, subgrp
, addpath_tx_id
)) != NULL
)
510 /* Clean up previous advertisement. */
512 bgp_advertise_clean_subgroup (subgrp
, adj
);
514 if (adj
->attr
&& withdraw
)
516 /* We need advertisement structure. */
517 adj
->adv
= bgp_advertise_new ();
522 /* Note if we need to trigger a packet write */
523 if (BGP_ADV_FIFO_EMPTY (&subgrp
->sync
->withdraw
))
528 /* Add to synchronization entry for withdraw announcement. */
529 BGP_ADV_FIFO_ADD (&subgrp
->sync
->withdraw
, &adv
->fifo
);
531 /* Schedule packet write, if FIFO is getting its first entry. */
533 subgroup_trigger_write(subgrp
);
537 /* Remove myself from adjacency. */
538 BGP_ADJ_OUT_DEL (rn
, adj
);
540 /* Free allocated information. */
543 bgp_unlock_node (rn
);
547 subgrp
->version
= max (subgrp
->version
, rn
->version
);
551 bgp_adj_out_remove_subgroup (struct bgp_node
*rn
, struct bgp_adj_out
*adj
,
552 struct update_subgroup
*subgrp
)
555 bgp_attr_unintern (&adj
->attr
);
558 bgp_advertise_clean_subgroup (subgrp
, adj
);
560 BGP_ADJ_OUT_DEL (rn
, adj
);
565 * Go through all the routes and clean up the adj/adv structures corresponding
569 subgroup_clear_table (struct update_subgroup
*subgrp
)
571 struct bgp_adj_out
*aout
, *taout
;
573 SUBGRP_FOREACH_ADJ_SAFE (subgrp
, aout
, taout
)
575 struct bgp_node
*rn
= aout
->rn
;
576 bgp_adj_out_remove_subgroup (rn
, aout
, subgrp
);
577 bgp_unlock_node (rn
);
582 * subgroup_announce_table
585 subgroup_announce_table (struct update_subgroup
*subgrp
,
586 struct bgp_table
*table
)
591 struct attr_extra extra
;
597 peer
= SUBGRP_PEER (subgrp
);
598 afi
= SUBGRP_AFI (subgrp
);
599 safi
= SUBGRP_SAFI (subgrp
);
600 addpath_capable
= bgp_addpath_encode_tx (peer
, afi
, safi
);
603 table
= peer
->bgp
->rib
[afi
][safi
];
605 if (safi
!= SAFI_MPLS_VPN
606 && safi
!= SAFI_ENCAP
608 && CHECK_FLAG (peer
->af_flags
[afi
][safi
], PEER_FLAG_DEFAULT_ORIGINATE
))
609 subgroup_default_originate (subgrp
, 0);
611 /* It's initialized in bgp_announce_check() */
614 for (rn
= bgp_table_top (table
); rn
; rn
= bgp_route_next (rn
))
615 for (ri
= rn
->info
; ri
; ri
= ri
->next
)
617 if (CHECK_FLAG (ri
->flags
, BGP_INFO_SELECTED
) ||
618 (addpath_capable
&& bgp_addpath_tx_path(peer
, afi
, safi
, ri
)))
620 if (subgroup_announce_check (rn
, ri
, subgrp
, &rn
->p
, &attr
))
621 bgp_adj_out_set_subgroup (rn
, subgrp
, &attr
, ri
);
623 bgp_adj_out_unset_subgroup (rn
, subgrp
, 1, ri
->addpath_tx_id
);
627 * We walked through the whole table -- make sure our version number
628 * is consistent with the one on the table. This should allow
629 * subgroups to merge sooner if a peer comes up when the route node
630 * with the largest version is no longer in the table. This also
631 * covers the pathological case where all routes in the table have
634 subgrp
->version
= max (subgrp
->version
, table
->version
);
637 * Start a task to merge the subgroup if necessary.
639 update_subgroup_trigger_merge_check (subgrp
, 0);
643 * subgroup_announce_route
645 * Refresh all routes out to a subgroup.
648 subgroup_announce_route (struct update_subgroup
*subgrp
)
651 struct bgp_table
*table
;
652 struct peer
*onlypeer
;
654 if (update_subgroup_needs_refresh (subgrp
))
656 update_subgroup_set_needs_refresh (subgrp
, 0);
660 * First update is deferred until ORF or ROUTE-REFRESH is received
662 onlypeer
= ((SUBGRP_PCOUNT (subgrp
) == 1) ?
663 (SUBGRP_PFIRST (subgrp
))->peer
: NULL
);
665 CHECK_FLAG (onlypeer
->
666 af_sflags
[SUBGRP_AFI (subgrp
)][SUBGRP_SAFI (subgrp
)],
667 PEER_STATUS_ORF_WAIT_REFRESH
))
670 if (SUBGRP_SAFI (subgrp
) != SAFI_MPLS_VPN
&&
671 SUBGRP_SAFI (subgrp
) != SAFI_ENCAP
&&
672 SUBGRP_SAFI (subgrp
) != SAFI_EVPN
)
673 subgroup_announce_table (subgrp
, NULL
);
675 for (rn
= bgp_table_top (update_subgroup_rib (subgrp
)); rn
;
676 rn
= bgp_route_next (rn
))
677 if ((table
= (rn
->info
)) != NULL
)
678 subgroup_announce_table (subgrp
, table
);
682 subgroup_default_originate (struct update_subgroup
*subgrp
, int withdraw
)
686 struct aspath
*aspath
;
692 int ret
= RMAP_DENYMATCH
;
699 peer
= SUBGRP_PEER (subgrp
);
700 afi
= SUBGRP_AFI (subgrp
);
701 safi
= SUBGRP_SAFI (subgrp
);
703 if (!(afi
== AFI_IP
|| afi
== AFI_IP6
))
707 from
= bgp
->peer_self
;
709 bgp_attr_default_set (&attr
, BGP_ORIGIN_IGP
);
710 aspath
= attr
.aspath
;
711 attr
.local_pref
= bgp
->default_local_pref
;
714 str2prefix ("0.0.0.0/0", &p
);
715 else if (afi
== AFI_IP6
)
717 struct attr_extra
*ae
= attr
.extra
;
719 str2prefix ("::/0", &p
);
721 /* IPv6 global nexthop must be included. */
722 ae
->mp_nexthop_len
= BGP_ATTR_NHLEN_IPV6_GLOBAL
;
724 /* If the peer is on shared nextwork and we have link-local
726 if (peer
->shared_network
727 && !IN6_IS_ADDR_UNSPECIFIED (&peer
->nexthop
.v6_local
))
728 ae
->mp_nexthop_len
= BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL
;
731 if (peer
->default_rmap
[afi
][safi
].name
)
733 SET_FLAG (bgp
->peer_self
->rmap_type
, PEER_RMAP_TYPE_DEFAULT
);
734 for (rn
= bgp_table_top (bgp
->rib
[afi
][safi
]); rn
;
735 rn
= bgp_route_next (rn
))
737 for (ri
= rn
->info
; ri
; ri
= ri
->next
)
739 struct attr dummy_attr
;
740 struct attr_extra dummy_extra
;
741 struct bgp_info info
;
743 /* Provide dummy so the route-map can't modify the attributes */
744 dummy_attr
.extra
= &dummy_extra
;
745 bgp_attr_dup (&dummy_attr
, ri
->attr
);
746 info
.peer
= ri
->peer
;
747 info
.attr
= &dummy_attr
;
750 route_map_apply (peer
->default_rmap
[afi
][safi
].map
, &rn
->p
,
753 /* The route map might have set attributes. If we don't flush them
754 * here, they will be leaked. */
755 bgp_attr_flush (&dummy_attr
);
756 if (ret
!= RMAP_DENYMATCH
)
759 if (ret
!= RMAP_DENYMATCH
)
762 bgp
->peer_self
->rmap_type
= 0;
764 if (ret
== RMAP_DENYMATCH
)
770 if (CHECK_FLAG (subgrp
->sflags
, SUBGRP_STATUS_DEFAULT_ORIGINATE
))
771 subgroup_default_withdraw_packet (subgrp
);
772 UNSET_FLAG (subgrp
->sflags
, SUBGRP_STATUS_DEFAULT_ORIGINATE
);
776 if (!CHECK_FLAG (subgrp
->sflags
, SUBGRP_STATUS_DEFAULT_ORIGINATE
))
778 SET_FLAG (subgrp
->sflags
, SUBGRP_STATUS_DEFAULT_ORIGINATE
);
779 subgroup_default_update_packet (subgrp
, &attr
, from
);
781 /* The 'neighbor x.x.x.x default-originate' default will act as an
782 * implicit withdraw for any previous UPDATEs sent for 0.0.0.0/0 so
783 * clear adj_out for the 0.0.0.0/0 prefix in the BGP table.
786 str2prefix ("0.0.0.0/0", &p
);
788 str2prefix ("::/0", &p
);
790 rn
= bgp_afi_node_get (bgp
->rib
[afi
][safi
], afi
, safi
, &p
, NULL
);
791 bgp_adj_out_unset_subgroup (rn
, subgrp
, 0, BGP_ADDPATH_TX_ID_FOR_DEFAULT_ORIGINATE
);
795 bgp_attr_extra_free (&attr
);
796 aspath_unintern (&aspath
);
800 * Announce the BGP table to a subgroup.
802 * At startup, we try to optimize route announcement by coalescing the
803 * peer-up events. This is done only the first time - from then on,
804 * subgrp->v_coalesce will be set to zero and the normal logic
808 subgroup_announce_all (struct update_subgroup
*subgrp
)
814 * If coalesce timer value is not set, announce routes immediately.
816 if (!subgrp
->v_coalesce
)
818 if (bgp_debug_update(NULL
, NULL
, subgrp
->update_group
, 0))
819 zlog_debug ("u%" PRIu64
":s%" PRIu64
" announcing all routes",
820 subgrp
->update_group
->id
, subgrp
->id
);
821 subgroup_announce_route (subgrp
);
826 * We should wait for the coalesce timer. Arm the timer if not done.
828 if (!subgrp
->t_coalesce
)
830 thread_add_timer_msec(bm
->master
, subgroup_coalesce_timer
, subgrp
,
831 subgrp
->v_coalesce
, &subgrp
->t_coalesce
);
836 * Go through all update subgroups and set up the adv queue for the
840 group_announce_route (struct bgp
*bgp
, afi_t afi
, safi_t safi
,
841 struct bgp_node
*rn
, struct bgp_info
*ri
)
843 struct updwalk_context ctx
;
846 update_group_af_walk (bgp
, afi
, safi
, group_announce_route_walkcb
, &ctx
);
850 update_group_show_adj_queue (struct bgp
*bgp
, afi_t afi
, safi_t safi
,
851 struct vty
*vty
, uint64_t id
)
853 updgrp_show_adj (bgp
, afi
, safi
, vty
, id
, UPDWALK_FLAGS_ADVQUEUE
);
857 update_group_show_advertised (struct bgp
*bgp
, afi_t afi
, safi_t safi
,
858 struct vty
*vty
, uint64_t id
)
860 updgrp_show_adj (bgp
, afi
, safi
, vty
, id
, UPDWALK_FLAGS_ADVERTISED
);
864 update_group_announce (struct bgp
*bgp
)
866 update_group_walk (bgp
, update_group_announce_walkcb
, NULL
);
870 update_group_announce_rrclients (struct bgp
*bgp
)
872 update_group_walk (bgp
, update_group_announce_rrc_walkcb
, NULL
);