Multiple parameters in function

Eiichiro Watanabe watanabe at mfeed.ad.jp
Mon Dec 12 13:29:41 CET 2011


Hello,

I'm trying to configure the below using examples from bird wiki.
(https://git.nic.cz/redmine/projects/bird/wiki/BGP_filtering)

But it fails when type "configure" on birdc with a following message.
"bird: /etc/bird.conf, line 16: syntax error"

It works when I define one parameter in function.

Are multiple parameters in function supported on 1.3.4?
Or please correct me if I make any mistakes.

bird.conf
--snip--
16: function rt_import(int peer_as, int set peer_asns, prefix set peer_net)
17: {
18:        if ! ( net ~ peer_net ) then return false;
19:        if ! ( bgp_path.last ~ peer_asns ) then return false;
20:        return true;
21: }
22:
23: filter AS65000_IN
24: {
25:   if ! rt_import(65000, [ 65000, 65001 ], [ 10.0.0.0/8, 192.168.0.0/24 ]) then reject;
26:   accept;
27: }
28: 
29: protocol bgp TEST {
30:         local as myas;
31:         neighbor 172.16.0.1 as 65000;
32:         import filter AS65000_IN;
33: }
--snip--

Thanks,
Eiichiro

-- 
###################################################
Eiichiro Watanabe
Internet Multifeed Co.



More information about the Bird-users mailing list