Fixes handling of iface routes in static proto during reconfiguration.

During reconfiguration, iface routes were installed even when iface was down.
This commit is contained in:
Ondrej Zajicek 2013-02-09 00:53:04 +01:00
parent 36da2857bc
commit c6a2fe64be

View file

@ -461,7 +461,7 @@ static_reconfigure(struct proto *p, struct proto_config *new)
WALK_LIST(r, n->iface_routes)
{
struct iface *ifa;
if (ifa = if_find_by_name(r->if_name))
if ((ifa = if_find_by_name(r->if_name)) && (ifa->flags & IF_UP))
static_install(p, r, ifa);
}
WALK_LIST(r, n->other_routes)