0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09:41:54 +00:00

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.
This commit is contained in:
Ondrej Zajicek 2013-04-16 17:40:44 +02:00
parent 48bc232f08
commit 8bd9b930c3

View File

@ -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))