1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Filter: Make ifname attribute modifiable

Allow to change an interface associated with a route by setting
ifname attribute. It will also change the route to a direct one.
This commit is contained in:
Ondrej Zajicek (work)
2018-11-05 22:03:21 +01:00
parent 69b2f63d9a
commit f2d8e6801e
4 changed files with 21 additions and 5 deletions

View File

@@ -1002,6 +1002,20 @@ interpret(struct f_inst *what)
rta->hostentry = NULL;
break;
case SA_IFNAME:
{
struct iface *ifa = if_find_by_name(v1.val.s);
if (!ifa)
runtime( "Invalid iface name" );
rta->dest = RTD_UNICAST;
rta->nh.gw = IPA_NONE;
rta->nh.iface = ifa;
rta->nh.next = NULL;
rta->hostentry = NULL;
}
break;
default:
bug("Invalid static attribute access (%x)", res.type);
}