From 8a3ef346221634131e3c24b0c4c769c55c41b5d9 Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Fri, 4 Jan 2008 15:34:25 -0800 Subject: fix for static interface and static nexthop routes for quagga. Now respects cable pull (IFF_RUNNING) events and admin (IFF_UP) events. On false for either event pulls routes from rib, and on true reinserts these back into kernel fib. --- zebra/interface.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'zebra/interface.c') diff --git a/zebra/interface.c b/zebra/interface.c index 184b42a0..7dc1b68d 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -274,7 +274,7 @@ if_addr_wakeup (struct interface *ifp) /* Address check. */ if (p->family == AF_INET) { - if (! if_is_up (ifp)) + if (! if_is_operative (ifp)) { /* XXX: WTF is it trying to set flags here? * caller has just gotten a new interface, has been @@ -311,7 +311,7 @@ if_addr_wakeup (struct interface *ifp) #ifdef HAVE_IPV6 if (p->family == AF_INET6) { - if (! if_is_up (ifp)) + if (! if_is_operative (ifp)) { /* XXX: See long comment above */ if_set_flags (ifp, IFF_UP | IFF_RUNNING); @@ -379,7 +379,7 @@ if_delete_update (struct interface *ifp) zebra_if = ifp->info; - if (if_is_up(ifp)) + if (if_is_operative(ifp)) { zlog_err ("interface %s index %d is still up while being deleted.", ifp->name, ifp->ifindex); @@ -1205,7 +1205,7 @@ ip_address_install (struct vty *vty, struct interface *ifp, && CHECK_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE)) { /* Some system need to up the interface to set IP address. */ - if (! if_is_up (ifp)) + if (! if_is_operative (ifp)) { if_set_flags (ifp, IFF_UP | IFF_RUNNING); if_refresh (ifp); @@ -1398,7 +1398,7 @@ ipv6_address_install (struct vty *vty, struct interface *ifp, && CHECK_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE)) { /* Some system need to up the interface to set IP address. */ - if (! if_is_up (ifp)) + if (! if_is_operative (ifp)) { if_set_flags (ifp, IFF_UP | IFF_RUNNING); if_refresh (ifp); -- cgit v1.2.3