By configuring filtering conditions for the received routes, you can allow only the routes that meet the filtering conditions to be added to the routing table.
OSPF is a dynamic routing protocol based on the link state, and routing information is hidden in the link state. Therefore, the filter-policy import command cannot be used to filter the advertised and received LSAs. You can then run the filter-policy import command to filter the routes calculated by OSPF. Only the routes that match the filtering rules are added to the routing table.
The filter-policy import command is used to filter only the routes that match OSPF and are installed to the local routing table. Routes that do not pass the filtering are neither added to the OSPF routing table nor advertised. Therefore, whether the received routes pass the filtering or not, the LSDB is not affected.
ospf [ process-id ]
filter-policy { acl-number | ip-prefix ip-prefix-name | route-policy route-policy-name [ secondary ] } import