Hey Naoki,
I am also relatively new to bird, however how I would solve the problem is by nesting functions. As far as I can see, you can accept/reject in functions, too - you are not limited to return true/false. Best, Nico amphineko <[email protected]> writes: > Hello there, > > I'm a newbie to BIRD, using BIRD 1.6.3 and setting up my first router. > I have multiple filters which filter different subnets and apply > different attribute modifications. > > Currently I put my subnet checks in a function which returns true if a > subnet matches, and invoke the function in a filter like this: > > function is_asxxxx() { > if net ~ [114.51.4.0/24] then return true; > return false; > } > > function is_asyyyy() { > if net ~ [19.19.81.0/24] then return true; > return false; > } > > filter f_customers { > if is_asxxxx() then accept; > if is_asyyyy() then { > bgp_community.add((114514, 191981)); > accept; > } > reject; > } > > I'm wondering if I can invoke other filters inside a filter, so the > is_asxxx can also used as an filter. I can't find an example to > achieve this. > > Regards, > Naoki Kobayashi -- Your Swiss, Open Source and IPv6 Virtual Machine. Now on www.datacenterlight.ch.
