<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi all,<br>
<br>
I've a problem with a function in bird and I would like to do print
for see what it happens (bold).<br>
<br>
How can i see this prints in the log?<br>
<br>
log "/var/log/bird.log" all;<br>
debug protocols { states, routes, filters, interfaces, events };<br>
<br>
<br>
********************************************<br>
# AS1111, used_by client AS1111_1 Client<br>
define AS_SET_AS1111_asns = [<br>
1111<br>
];<br>
<br>
define AS_SET_AS1111_prefixes = [<br>
1.1.1.1/24<br>
<br>
];<br>
<br>
AS-SET for AS1111_1<br>
function origin_as_is_in_AS1111_1_as_set() {<br>
if bgp_path.last ~ AS_SET_AS1111_asns then<br>
return true;<br>
return false;<br>
}<br>
<br>
# R-SET for AS1111_1<br>
function prefix_is_in_AS1111_1_as_set() {<br>
if net ~ AS_SET_AS1111_prefixes then<br>
return true;<br>
return false;<br>
}<br>
<br>
<br>
<br>
<br>
function verify_AS1111_1_irrdb()<br>
bool origin_ok;<br>
bool prefix_ok;<br>
bool validated;<br>
{<br>
origin_ok = false;<br>
prefix_ok = false;<br>
validated = false;<br>
origin_ok = origin_as_is_in_AS1111_1_as_set();<br>
prefix_ok = prefix_is_in_AS1111_1_as_set();<br>
<br>
<b> print origin_ok;</b><b><br>
</b><b> print prefix_ok;</b><br>
<br>
if !origin_ok then {<br>
bgp_community.add((65530, 0));<br>
bgp_large_community.add((RSasn, 65530, 0));<br>
<br>
}<br>
if origin_ok then {<br>
bgp_community.add((65530, 1));<br>
bgp_large_community.add((RSasn, 65530, 1));<br>
<br>
}<br>
<br>
if !validated && !origin_ok then {<br>
reject "origin ASN [", bgp_path.last, "] not in
allowed as-sets - REJECTING ", net;<br>
<br>
}<br>
if !validated && !prefix_ok then {<br>
reject "prefix not in client's r_set - REJECTING ",
net;<br>
<br>
}<br>
}<br>
filter receive_from_AS1111_1{<br>
<br>
.......<br>
verify_AS1111_1_irrdb()<br>
.......<br>
}<br>
*******************************************<br>
<br>
Thank you in advance.<br>
<br>
Manel<br>
</body>
</html>