diff options
author | Amit Nishry <amit.nishry@gmail.com> | 2019-09-01 20:26:46 +0300 |
---|---|---|
committer | Amit Nishry <amit.nishry@gmail.com> | 2019-09-01 20:26:46 +0300 |
commit | a2ecd78e9fc92d09a889d05c14ed9fdf99218a06 (patch) | |
tree | 1393b838128483577bf97d3523bd79f2e26d8e4f /cmd | |
parent | fb174b6b94d917e27cd496d908ad4a4a4f4a9787 (diff) |
Fix nexhop overwrite with gobgp mrt inject --no-ipv6 --nexthop x.x.x.x
Signed-off-by: Amit Nishry <amit.nishry@gmail.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/gobgp/mrt.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/gobgp/mrt.go b/cmd/gobgp/mrt.go index 61ce0a59..70cb2a2a 100644 --- a/cmd/gobgp/mrt.go +++ b/cmd/gobgp/mrt.go @@ -121,7 +121,7 @@ func injectMrt() error { case mrt.RIB_IPV4_UNICAST, mrt.RIB_IPV4_UNICAST_ADDPATH: if mrtOpts.NextHop != nil { for i, attr := range e.PathAttributes { - if attr.GetType() != bgp.BGP_ATTR_TYPE_NEXT_HOP { + if attr.GetType() == bgp.BGP_ATTR_TYPE_NEXT_HOP { e.PathAttributes[i] = bgp.NewPathAttributeNextHop(mrtOpts.NextHop.String()) break } |