From f8a0565c5ff0d744a4372371d4b135bdf34ffac1 Mon Sep 17 00:00:00 2001 From: Alexandre Snarskii Date: Mon, 13 Jul 2015 14:36:13 +0300 Subject: [PATCH] stoplist shall work for asns too. --- bgpq_expander.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bgpq_expander.c b/bgpq_expander.c index 07ac0be..c307a36 100644 --- a/bgpq_expander.c +++ b/bgpq_expander.c @@ -265,6 +265,11 @@ bgpq_expanded_macro_limit(char* as, struct bgpq_expander* b, b->cdepth?(b->cdepth+1):(req->depth+1)); }; } else if(!strncasecmp(as, "AS", 2)) { + struct sx_tentry tkey = { .text = as }; + if (RB_FIND(tentree, &b->stoplist, &tkey)) { + SX_DEBUG(debug_expander>2,"%s is in the stoplist, ignore\n", as); + return 0; + }; if(bgpq_expander_add_as(b, as)) { SX_DEBUG(debug_expander>2, ".. added asn %s\n", as); } else {