Import directly connected routes

Ondrej Zajicek santiago at crfreenet.org
Tue May 9 13:32:04 CEST 2017


On Mon, May 08, 2017 at 04:43:32PM -0400, Damien Clabaut wrote:
> Hello again,
> 
> Is there any way to declare a list of interfaces in a string set or
> something ?

No, string sets are not implemented. Although it is something that makes
sense to add.

You could define functions that match a set of string:

function xxx(string s)
{
    return s = "dev1" || s = "dev2" || s = "dev3";
}

Then you could use such functions in filters of direct and pipe protocol.

Instead of:

protocol direct direct_numa0 {
    table numa0;
    interface "eth4.800", "eth4.801";
}

You could use:

protocol direct direct_numa0 {
    table numa0;
    import where xxx(ifname);
}


-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."


More information about the Bird-users mailing list