Filtering question

Alarig Le Lay alarig at
Mon Mar 20 16:14:14 CET 2017


I have this configuration:

function bgp_filter_customer_in (prefix customer_prefix) {
        if ! (net ~ customer_prefix) then return false;
        else return true;

template bgp PEERS {
        local as myasn;
        import keep filtered;
        import all;
        export all;
        import limit 100 action restart;
        rs client;
        source address 2001:7f8:b1::1;

filter bgp_filter_grifon_nominoe_in {
        if (bgp_filter_customer_in([ 2a00:5884::/32, 2001:678:3cc::/48 ]))
	    then {
        } else {
                reject "Prefix filtered for Grifon";

protocol bgp bgp_grifon_nominoe from PEERS {
        description "Grifon nominoe";
        neighbor 2001:7f8:b1::a as 204092;
        import filter bgp_filter_grifon_nominoe_in;

But the two announced prefixes are filtered:
bird> show route filtered protocol bgp_grifon_nominoe
2a00:5884::/32     via 2001:7f8:b1::a on eth2 [bgp_grifon_nominoe 16:05:53] (100) [AS204092i]
2001:678:3cc::/48  via 2001:7f8:b1::a on eth2 [bgp_grifon_nominoe 16:05:53] (100) [AS206155i]

If I just pass one prefix in the filter, this prefix is accepted, so I
don’t understand why they are filtered with this configuration. Plus, I
used the same syntax for the IPv4 prefixes and it works.

I’m using bird 1.6.3.

Thanks for your advices,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <>

More information about the Bird-users mailing list