[Xorp-hackers] get_route_list_next assert on empty aggregator

Atanu Ghosh atanu at ICSI.Berkeley.EDU
Thu Jul 5 12:40:49 PDT 2007


Hi,

The assumption in the "BGPMain::get_route_list_next()" and
"BGPMain::extract_attributes()" are that the output parameters are
empty, the vector arguments of which "aggregator" is just one should be
set to size zero. These methods were designed to be called by an
external program via XRL to extract the routing table entries and each
call starts with zero size vectors. If you are calling
"BGPMain::get_route_list_next()" in a loop from within BGP and there is
an aggregator in the table the subsequent call will cause this
assert. So "aggregator.resize(0)" before calling
"BGPMain::get_route_list_next()" should fix you problem.

Adding code to BGP to use this interface to trawl the routing table is a
bad idea, you should look at print_routes.cc in bgp/tools that provides
an external program to extract the routes from BGP using this interface.

   Atanu.

>>>>> "Yuval" == Yuval Lifshitz <yuvalif at gmail.com> writes:

    Yuval>    Hi all, I use the "get_route_list_next" from the BGP main
    Yuval> process in order to iterate over the RIB.  It worked fine
    Yuval> when I tried that in the lab, but when my peer was a real
    Yuval> Juniper T router, I got: assert( aggregator.size()==0); in:
    Yuval> BGPMain::extract_attributes() any idea? is that a valid
    Yuval> message the Juniper sent?  could I just bury my head in the
    Yuval> sand and comment it out?  Thanks, Yuval.
    Yuval> _______________________________________________ Xorp-hackers
    Yuval> mailing list Xorp-hackers at icir.org
    Yuval> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers



More information about the Xorp-hackers mailing list