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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user