BIRD 2.x and arrays

Carlo Rengo info at carlorengo.it
Wed Jun 27 15:50:45 CEST 2018


Hi,
I'm testing BIRD 2 (version 2.0.2) but I am having issue with the new syntax. More specifically, with arrays. This is a snippet of my configuration:

protocol direct direct1 {
    interface "lo";
    debug all;
    ipv4 {
        import where net ~ 192.168.60.0/24 ;
        export none;
    };
}

I start bird and this is the logged output:

2018-06-27T15:26:21.123818+02:00 my.bird.router.com bird: direct1 < address 127.0.0.0/8 on interface lo added
2018-06-27T15:31:19.396405+02:00 my.bird.router.com bird: direct1 < address 192.168.60.10/32 on interface lo added
2018-06-27T15:31:19.396527+02:00 my.bird.router.com bird: direct1 > filtered out 192.168.60.10/32 unicast
2018-06-27T15:31:19.396653+02:00 my.bird.router.com bird: direct1 < address 192.168.60.20/32 on interface lo added
2018-06-27T15:31:19.396778+02:00 my.bird.router.com bird: direct1 > filtered out 192.168.60.20/32 unicast
2018-06-27T15:31:19.397165+02:00 my.bird.router.com bird: direct1 < address 192.168.60.21/32 on interface lo added
2018-06-27T15:31:19.397295+02:00 my.bird.router.com bird: direct1 > filtered out 192.168.60.21/32 unicast
2018-06-27T15:31:19.397419+02:00 my.bird.router.com bird: direct1 < address 192.168.60.12/32 on interface lo added
2018-06-27T15:31:19.397541+02:00 my.bird.router.com bird: direct1 > filtered out 192.168.60.12/32 unicast

This works as expected. Now, if I try to use even a 1-member array, like this: 

protocol direct direct1 {
    interface "lo";
    debug all;
    ipv4 {
        import where net ~ [ 192.168.60.0/24 ];
        export none;
    };
}

the result is that bird filters out my IPs. These are the relevant log lines:

2018-06-27T15:26:21.123818+02:00 my.bird.router.com bird: direct1 < address 127.0.0.0/8 on interface lo added
2018-06-27T15:26:21.123943+02:00 my.bird.router.com bird: direct1 < address 192.168.60.10/32 on interface lo added
2018-06-27T15:26:21.124277+02:00 my.bird.router.com bird: direct1 > added [best] 192.168.60.10/32 unicast
2018-06-27T15:26:21.124406+02:00 my.bird.router.com bird: direct1 < address 192.168.60.20/32 on interface lo added
2018-06-27T15:26:21.124534+02:00 my.bird.router.com bird: direct1 > added [best] 192.168.60.20/32 unicast
2018-06-27T15:26:21.124913+02:00 my.bird.router.com bird: direct1 < address 192.168.60.21/32 on interface lo added
2018-06-27T15:26:21.125041+02:00 my.bird.router.com bird: direct1 > added [best] 192.168.60.21/32 unicast
2018-06-27T15:26:21.125177+02:00 my.bird.router.com bird: direct1 < address 192.168.60.12/32 on interface lo added
2018-06-27T15:26:21.125304+02:00 my.bird.router.com bird: direct1 > added [best] 192.168.60.12/32 unicast

"import where net ~" + "array" has always worked fine with BIRD 1.6. Did the syntax change on v2? Is this a bug? 

Thanks,
Carlo


More information about the Bird-users mailing list