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

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.
parent c408d807
Pipeline #35357 passed with stages
in 5 minutes and 37 seconds
......@@ -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.
*/
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));
......
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