BGP communities filter issue

I have an issue with BGP community filter
I want to give only few communities to neighbour

What I am doing:
routing filter add chain=bgp-out bgp-communities=65009:0 invert-match=no action=accept set-bgp-prepend-path=“”
routing filter add chain=bgp-out bgp-communities=“” invert-match=no action=discard set-bgp-prepend-path=“”
routing bgp peer set peer out-filter=bgp-out

After that i have what i want, neighbour have only routes from community 65009:0. If i trying to give communities as list:

routing filter add chain=bgp-out bgp-communities=65009:0, 65012:0 invert-match=no action=accept set-bgp-prepend-path=“”
routing filter add chain=bgp-out bgp-communities=“” invert-match=no action=discard set-bgp-prepend-path=“”
routing bgp peer set peer out-filter=bgp-out

then neighbour have no routes, but i beilive that neighbour must have routes from communities 65009:0 and 65012:0.

what do i do wrong?

It sounds like the rule is requiring both communities, not one or the other.

From the documentation:

bgp-communities (integer:integer | internet | local-as | no-advertise | no-export;)
match the COMMUNITIES BGP attribute. Match is done when communities attribute in a route contains all entries from this configured list. But note that if communities list contains ‘internet’, the whole list always matched.

http://wiki.mikrotik.com/wiki/Manual:Routing/Routing_filters

Try putting 2 rules, one for each community that you want to allow out.

You could set up a testbed BGP peer so you could play with filters all day long and never break anything.
(make a test-out filter for that peer so you don’t accidentally change the real filter)