Commit f3a8cf05 authored by Ondrej Zajicek (work)'s avatar Ondrej Zajicek (work)
Browse files

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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));