Filtering question

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


Hi,

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 {
                accept;
        } 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,
-- 
alarig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20170320/742f0f53/attachment.asc>


More information about the Bird-users mailing list