bird6 has a rather limited list of IPv6 address classifications, unfortunately limiting the routes that it will accept. ipv6_classify(ip_addr *a) in lib/ipv6.c: if ((x & 0xe0000000) == 0x20000000) /* 2000::/3 Aggregatable Global Unicast Address */ if ((x & 0xffc00000) == 0xfe800000) /* fe80::/10 Link-Local Address */ if ((x & 0xffc00000) == 0xfec00000) /* fec0::/10 Site-Local Address */ if ((x & 0xfe000000) == 0xfc000000) /* fc00::/7 Unique Local Unicast Address (RFC 4193) */ if ((x & 0xff000000) == 0xff000000) /* ff00::/8 Multicast Address */ Unfortunately there is a bad side-effect when a BGP peer sends a route for an address that does not fit any of these classifications; bird6 claims that they are "bogus routes", and then seems to drop any routes that have already been received by that peer. This problem can be very easily reproduced in bird6-1.3.1 by receiving a route outside of these ranges. The validation code appears below, and the problem can be very easily corrected by commenting it out: rte_validate(rte *e) in nest/rt-table.c: c = ipa_classify_net(n->n.prefix); if ((c < 0) || !(c & IADDR_HOST) || ((c & IADDR_SCOPE_MASK) <= SCOPE_LINK)) { log(L_WARN "Ignoring bogus route %I/%d received via %s", n->n.prefix, n->n.pxlen, e->sender->name); return 0; } I am interested to hear whether the strictness of the ipv6_classify(ip_addr *a) function would be considered a "bug" or a "feature", but from what I can tell, quagga and openbgpd do not classify addresses in such a strict fashion, and this can produce problems in mixed environments where quagga/openbgpd peers may try and send such routes to bird6. Perhaps any address that is not link-scoped should be implicitly classified as global? At the very least, receiving a "bogus route" should not result in all existing routes from that peer being dropped.
On Thu, Jun 09, 2011 at 02:14:46PM +0100, lex wrote:
I am interested to hear whether the strictness of the ipv6_classify(ip_addr *a) function would be considered a "bug" or a "feature", but from what I can tell, quagga and openbgpd do not classify addresses in such a strict fashion, and this can produce problems in mixed environments where quagga/openbgpd peers may try and send such routes to bird6.
Perhaps any address that is not link-scoped should be implicitly classified as global? At the very least, receiving a "bogus route" should not result in all existing routes from that peer being dropped.
I am not sure about the classification of such strange routes, but it definitely shouldn't affect other routes from that peer. I will check that. -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
On 10/06/2011 01:23, Ondrej Zajicek wrote:
On Thu, Jun 09, 2011 at 02:14:46PM +0100, lex wrote:
I am interested to hear whether the strictness of the ipv6_classify(ip_addr *a) function would be considered a "bug" or a "feature", but from what I can tell, quagga and openbgpd do not classify addresses in such a strict fashion, and this can produce problems in mixed environments where quagga/openbgpd peers may try and send such routes to bird6.
Perhaps any address that is not link-scoped should be implicitly classified as global? At the very least, receiving a "bogus route" should not result in all existing routes from that peer being dropped.
I am not sure about the classification of such strange routes, but it definitely shouldn't affect other routes from that peer. I will check that.
Thanks. I am thinking that anything that does not fit link/site scope should be classed as global scope, even if just for compatibility with other software. There is a whole load of free address space out there; it should probably be routable by bird. That is just my opinion though. -- lex@lynx.vanet.org
participants (3)
-
lex -
lex -
Ondrej Zajicek