summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--cmd/gobgp/mrt.go2
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
}