diff options
Diffstat (limited to 'api/grpc_server.go')
-rw-r--r-- | api/grpc_server.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/api/grpc_server.go b/api/grpc_server.go index f9bdaf6a..a6306580 100644 --- a/api/grpc_server.go +++ b/api/grpc_server.go @@ -573,7 +573,7 @@ func (s *Server) api2PathList(resource Resource, ApiPathList []*Path) ([]*table. return nil, fmt.Errorf("not found nlri or nexthop") } - if resource != Resource_VRF && bgp.RouteFamily(path.Family) == bgp.RF_IPv4_UC { + if resource != Resource_VRF && bgp.RouteFamily(path.Family) == bgp.RF_IPv4_UC && net.ParseIP(nexthop).To4() != nil { pattr = append(pattr, bgp.NewPathAttributeNextHop(nexthop)) } else { pattr = append(pattr, bgp.NewPathAttributeMpReachNLRI(nexthop, []bgp.AddrPrefixInterface{nlri})) |