Debugging bird 1.6.3
Manel Pérez
manel.perez at csuc.cat
Tue Apr 24 16:34:17 CEST 2018
Hi all,
I've a problem with a function in bird and I would like to do print for
see what it happens (bold).
How can i see this prints in the log?
log "/var/log/bird.log" all;
debug protocols { states, routes, filters, interfaces, events };
********************************************
# AS1111, used_by client AS1111_1 Client
define AS_SET_AS1111_asns = [
1111
];
define AS_SET_AS1111_prefixes = [
1.1.1.1/24
];
AS-SET for AS1111_1
function origin_as_is_in_AS1111_1_as_set() {
if bgp_path.last ~ AS_SET_AS1111_asns then
return true;
return false;
}
# R-SET for AS1111_1
function prefix_is_in_AS1111_1_as_set() {
if net ~ AS_SET_AS1111_prefixes then
return true;
return false;
}
function verify_AS1111_1_irrdb()
bool origin_ok;
bool prefix_ok;
bool validated;
{
origin_ok = false;
prefix_ok = false;
validated = false;
origin_ok = origin_as_is_in_AS1111_1_as_set();
prefix_ok = prefix_is_in_AS1111_1_as_set();
* print origin_ok;**
** print prefix_ok;*
if !origin_ok then {
bgp_community.add((65530, 0));
bgp_large_community.add((RSasn, 65530, 0));
}
if origin_ok then {
bgp_community.add((65530, 1));
bgp_large_community.add((RSasn, 65530, 1));
}
if !validated && !origin_ok then {
reject "origin ASN [", bgp_path.last, "] not in allowed
as-sets - REJECTING ", net;
}
if !validated && !prefix_ok then {
reject "prefix not in client's r_set - REJECTING ", net;
}
}
filter receive_from_AS1111_1{
.......
verify_AS1111_1_irrdb()
.......
}
*******************************************
Thank you in advance.
Manel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20180424/224a6f8e/attachment.html>
More information about the Bird-users
mailing list