how to use "Operators" in bird
曾小小
flyinsky2018 at gmail.com
Tue Jul 22 09:09:40 CEST 2014
hi,
My system is Ubuntu 13.04, kernel version is 3.8.0-21-generic, bird version
is 1.4.4.
Device configuration is as follows:
1. about function
function rt_import (int asn; int set peer_asns; prefix set peer_nets)
{
if (net ~ peer_nets) then return false!;
}
2. about filter
filter bgp_upstream
{
if rt_import (64609, [64609], [192.168.1.0/24]) then reject;
}
In the above function, I use net ~ peer_nets to filter out peer_nets route,
but in filter medium, peer_nets defined as 192.168.1.0/24, which would lead
to such a fine route 192.168.1.1 will be filtered out. If the test using
the "-" operator, will lead filter to filter out all the routes. Why?
In the above example, how can I use "operators" to achieve peer_nets
defined as 192.168.1.0/24, 192.168.1.1 subnet address to ensure it will not
be filtered out.
Thank you very much for nothing always help, thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20140722/196370bc/attachment.html>
More information about the Bird-users
mailing list