Strange bgp_ext_community.add behaviour

Alexander Shikov a.shikov at dtel-ix.net
Thu Jul 3 11:28:44 CEST 2014


Hello,

I've met strange bgp_ext_community.add behaviour when adding ext. communities
to static route:

protocol static TEST {
        import filter {
                bgp_ext_community.add( (ro,MyASN,10856) );
                accept;
        };
        route 185.61.244.0/22 blackhole;
}

- works:
Jul  2 17:19:57 gate bird: TEST: State changed to down
Jul  2 17:19:57 gate bird: TEST: Starting
Jul  2 17:19:57 gate bird: TEST: Connected to table master
Jul  2 17:19:57 gate bird: TEST: State changed to feed
Jul  2 17:19:57 gate bird: TEST > added [best] 185.61.244.0/22 blackhole


protocol static TEST {
        import filter {
		bgp_ext_community.add([ (ro,MyASN,10856), (ro,MyASN,3) ]);
                accept;
        };
        route 185.61.244.0/22 blackhole;
}
- does not work. Route is filtered:
Jul  2 17:26:22 gate bird: TEST: State changed to down
Jul  2 17:26:22 gate bird: TEST: Starting
Jul  2 17:26:22 gate bird: TEST: Connected to table master
Jul  2 17:26:22 gate bird: TEST: State changed to feed
Jul  2 17:26:22 gate bird: TEST > filtered out 185.61.244.0/22 blackhole

bgp_ext_community.add( [ (ro,MyASN,10856) ] );
also don't work


But adding communities one-by-one works as expected:
protocol static TEST {
        import filter {
                bgp_ext_community.add( (ro,MyASN,10856) );
                bgp_ext_community.add( (ro,MyASN,3) );
                bgp_community.add( (65101, 1 ) );
                bgp_community.add( (65101, 2 ) );
                accept;
        };
        route 185.61.244.0/22 blackhole;
}

bird> show route all
185.61.244.0/22    blackhole [TEST 17:34:42] * (200)
        Type: static unicast univ
        BGP.community: (65101,2) (65101,1)
        BGP.ext_community: (ro, 201836, 10856) (ro, 201836, 3)

User's guide says that .add argument may be a (e)clist, thus this issue seems 
to be a bug.

Please, advice! Thanks.

-- 
Alexander Shikov
Technical Staff, Digital Telecom IX
Tel.: +380 44 201 14 07
http://dtel-ix.net/



More information about the Bird-users mailing list