Aqui também resolveu, mas aí o OSPF parou de falar com os parceiros :( Porcamente copiei o ospf antigo (dos ports) para o Bin. Ele falava algo nas mensagens que o numero de grupos IGMP foi excedido. Na internet mandava alterar o kernel... deve ter algo que os ports já fazem no código do OSPFD que resolve.
Enfim, como o problema é só no BGP, não tem problema nenhum fazer esta gambiarra! :) Algum ninja dos ports não poderia fazer esta contribuição ao Free não? Se me ensinarem eu até faço! Abraços > -----Mensagem original----- > De: [email protected] [mailto:[email protected]] Em > nome de Matheus Cucoloto > Enviada em: domingo, 3 de maio de 2009 14:24 > Para: Lista Brasileira de Discussão sobre FreeBSD (FUG-BR) > Assunto: Re: [FUG-BR] RES: quagga > > Segue o patch para o 0.99.11 > > Aqui resolveu! > > [r...@firewall-cvel-bgp1 /usr/ports/net/quagga/work/quagga-0.99.11]# > cat quagga-0.99.11-BGP-4-byte-ASN-bug-fixes.patch > --- bgpd/bgp_aspath.c 2008-04-10 11:47:45.000000000 +0000 > +++ bgpd/bgp_aspath.c 2009-04-30 20:12:22.000000000 +0000 > @@ -393,25 +393,6 @@ aspath_delimiter_char (u_char type, u_ch > return ' '; > } > > -/* countup asns from this segment and index onward */ > -static int > -assegment_count_asns (struct assegment *seg, int from) > -{ > - int count = 0; > - while (seg) > - { > - if (!from) > - count += seg->length; > - else > - { > - count += (seg->length - from); > - from = 0; > - } > - seg = seg->next; > - } > - return count; > -} > - > unsigned int > aspath_count_confeds (struct aspath *aspath) > { > @@ -521,13 +502,23 @@ aspath_count_numas (struct aspath *aspat > return num; > } > > +static char * > +aspath_expand (char *path, > + size_t *space, > + size_t needed) > +{ > + while (*space < needed) > + *space *= 2; > + return XREALLOC (MTYPE_AS_STR, path, *space); > +} > + > /* Convert aspath structure to string expression. */ > static char * > aspath_make_str_count (struct aspath *as) > { > struct assegment *seg; > - int str_size; > - int len = 0; > + size_t str_size; > + size_t len = 0; > char *str_buf; > > /* Empty aspath. */ > @@ -540,18 +531,7 @@ aspath_make_str_count (struct aspath *as > > seg = as->segments; > > - /* ASN takes 5 chars at least, plus seperator, see below. > - * If there is one differing segment type, we need an additional > - * 2 chars for segment delimiters, and the final '\0'. > - * Hopefully this is large enough to avoid hitting the realloc > - * code below for most common sequences. > - * > - * With 32bit ASNs, this range will increase, but only worth > changing > - * once there are significant numbers of ASN >= 100000 > - */ > -#define ASN_STR_LEN (5 + 1) > - str_size = MAX (assegment_count_asns (seg, 0) * ASN_STR_LEN + 2 + 1, > - ASPATH_STR_DEFAULT_LEN); > + str_size = ASPATH_STR_DEFAULT_LEN; > str_buf = XMALLOC (MTYPE_AS_STR, str_size); > > while (seg) > @@ -575,32 +555,25 @@ aspath_make_str_count (struct aspath *as > return NULL; > } > > - /* We might need to increase str_buf, particularly if path has > - * differing segments types, our initial guesstimate above will > - * have been wrong. need 5 chars for ASN, a seperator each and > - * potentially two segment delimiters, plus a space between each > - * segment and trailing zero. > - * > - * This may need to revised if/when significant numbers of > - * ASNs >= 100000 are assigned and in-use on the internet... > - */ > -#define SEGMENT_STR_LEN(X) (((X)->length * ASN_STR_LEN) + 2 + 1 + 1) > - if ( (len + SEGMENT_STR_LEN(seg)) > str_size) > - { > - str_size = len + SEGMENT_STR_LEN(seg); > - str_buf = XREALLOC (MTYPE_AS_STR, str_buf, str_size); > - } > -#undef ASN_STR_LEN > -#undef SEGMENT_STR_LEN > - > if (seg->type != AS_SEQUENCE) > - len += snprintf (str_buf + len, str_size - len, > - "%c", > - aspath_delimiter_char (seg->type, > AS_SEG_START)); > + { > + str_buf = aspath_expand (str_buf, > + &str_size, > + len + 2); /* %c + '\0' */ > + len += snprintf (str_buf + len, str_size - len, > + "%c", > + aspath_delimiter_char (seg->type, > AS_SEG_START)); > + } > > /* write out the ASNs, with their seperators, bar the last one*/ > for (i = 0; i < seg->length; i++) > { > +#define APPROX_DIGIT_COUNT(x) (x < 100000U ? 5 : 10) > + /* %u + %c + %c + " " + '\0' (last two are below loop) */ > + str_buf = aspath_expand (str_buf, > + &str_size, > + len + APPROX_DIGIT_COUNT(seg->as[i]) > + 4); > + > len += snprintf (str_buf + len, str_size - len, "%u", seg- > >as[i]); > > if (i < (seg->length - 1)) > > > > > 2009/5/3 Renato Frederick <[email protected]>: > > Qunado compilar do fonte, não esquecer de configurar para os pids > serem salvos em /var/run/quagga. E no meu caso o ospf não funcionou, > copiei o binário do quagga antigo(ele subia e não fechava a sessão com > os parceiros). > > > > Na verdade o que estou fazendo é compilando o bgpd e copiando-o > manualmente poara /usr/local/sbin > > > > Vamos ver se o resto de domingo fica sem incÊncido :-) > > > > Engraçado é um bug de 2 semanas atrás só explodir a partir de quinta > de hoje, será que so a partir de quinta que as operadoras atualizaram > seus sistemas para propagar asn 4bytes? > > > > > >> -----Mensagem original----- > >> De: [email protected] [mailto:[email protected]] > Em > >> nome de Matheus Cucoloto > >> Enviada em: domingo, 3 de maio de 2009 13:19 > >> Para: Lista Brasileira de Discussão sobre FreeBSD (FUG-BR) > >> Assunto: Re: [FUG-BR] quagga > >> > >> Também estou louco com isso, ta pipocando esse erro em todos os > >> lugares... > >> > >> Assertion `len < str_size' failed in file bgp_aspath.c, line 619 > >> > >> Abraços > >> > >> > >> 2009/5/3 Renato Frederick <[email protected]>: > >> > Senhores, para os que não acompanham a GTER e não costumam acessar > a > >> sessão de bug do quagga, façam patch da instalação 0.99.11 ou > 0.99.10 > >> ou downgrade, estas versões, sem o patch estão com problema com asn > de > >> 4bytes e o BGPD morre. > >> > > >> > Estou em pleno feriadão atendendo chamados deste tipo :( > >> > > >> > Abraços > >> > > >> > ------------------------- > >> > Histórico: http://www.fug.com.br/historico/html/freebsd/ > >> > Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd > >> > > >> > >> > >> > >> -- > >> Matheus Cucoloto > >> System Admin. > >> Net Admin. > >> ------------------------- > >> Histórico: http://www.fug.com.br/historico/html/freebsd/ > >> Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd > > ------------------------- > > Histórico: http://www.fug.com.br/historico/html/freebsd/ > > Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd > > > > > > -- > Matheus Cucoloto > System Admin. > Net Admin. > ------------------------- > Histórico: http://www.fug.com.br/historico/html/freebsd/ > Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd ------------------------- Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd

