From: Ondrej Zajicek Date: Tue, 16 Apr 2013 15:40:44 +0000 (+0200) Subject: Fixes a bug in IPv6 BGP next hop processing. X-Git-Tag: v1.3.10~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8bd9b930c320f09d3b3792b5f991cf702e9d55be;p=thirdparty%2Fbird.git Fixes a bug in IPv6 BGP next hop processing. BGP next hop attributes with empty link-local IPv6 addresses were not handled properly. Thanks to Sergey Popovich for the bugfix. --- diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index cfa37fb5d..f2e03f875 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -820,7 +820,7 @@ bgp_set_next_hop(struct bgp_proto *p, rta *a) ip_addr *nexthop = (ip_addr *) nh->u.ptr->data; #ifdef IPV6 - int second = (nh->u.ptr->length == NEXT_HOP_LENGTH); + int second = (nh->u.ptr->length == NEXT_HOP_LENGTH) && ipa_nonzero(nexthop[1]); /* First address should not be link-local, but may be zero in direct mode */ if (ipa_has_link_scope(*nexthop))