Commit 8bd9b930 authored by Ondřej Zajíček's avatar Ondřej Zajíček

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.
parent 48bc232f
......@@ -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))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment