Conversion of command from v6 to v7.8

From v6

/routing filter
add action=accept chain=ospf-in prefix=0.0.0.0/0 prefix-length=21
add action=accept chain=ospf-in prefix=0.0.0.0/0 prefix-length=23
add action=discard chain=ospf-in

How to convert this command to version 7.8 mikrotik os

https://help.mikrotik.com/docs/display/ROS/Moving+from+ROSv6+to+v7+with+examples#MovingfromROSv6tov7withexamples-RoutingFilters

Section on Routing filters.

https://help.mikrotik.com/docs/display/ROS/Route+Selection+and+Filters

how about this command

add action=discard chain=ospf-in

Thank you

If you use filters, what you don't accept is implicitly discarded at the end of any chain.
/routing filter rule
add chain=ospf-in disabled=no rule="if (dst in 0.0.0.0/0 && dst-len==21) { accept }"
add chain=ospf-in disabled=no rule="if (dst in 0.0.0.0/0 && dst-len==23) { accept }"

no need to discard, is all discarded after this point