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

BGP: Fix extended next hop handling

For IPv4 with extended next hop, we use MP-BGP format and therefore no
independent NEXT_HOP attribute.

Thanks to Arvin Gan for the bugreport.
This commit is contained in:
Ondrej Zajicek (work) 2018-04-12 16:55:56 +02:00
parent c408d807a3
commit f3a8cf050e

View File

@ -295,7 +295,7 @@ bgp_encode_next_hop(struct bgp_write_state *s, eattr *a, byte *buf, uint size)
* store it and encode it later by AFI-specific hooks. * store it and encode it later by AFI-specific hooks.
*/ */
if (s->channel->afi == BGP_AF_IPV4) if ((s->channel->afi == BGP_AF_IPV4) && !s->channel->ext_next_hop)
{ {
ASSERT(a->u.ptr->length == sizeof(ip_addr)); ASSERT(a->u.ptr->length == sizeof(ip_addr));