diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2018-04-12 16:55:56 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2018-04-12 16:55:56 +0200 |
commit | f3a8cf050e6181e158dcde2fe885d7bf220eedc3 (patch) | |
tree | a1e5e5adbefbebd8f062db775e2c5f8a72982e88 /proto/bgp | |
parent | c408d807a374b521dc66c434ca0dc5987820646f (diff) |
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.
Diffstat (limited to 'proto/bgp')
-rw-r--r-- | proto/bgp/attrs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c index 0f41f818..9003feb2 100644 --- a/proto/bgp/attrs.c +++ b/proto/bgp/attrs.c @@ -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)); |