From d3ea74a99a3d2bcc66e45bef716ba0a66e24020e Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 29 Apr 2008 11:08:15 -0700 Subject: Two passes on update (ipv4 and ipv6) When interface comes down, need two passes over the rib to correctly process rib updates. If interface has both ipv6 and ipv4 routes and comes down, need to do it as a two step process. Not sure exactly why, but suspect it has to do with the the work queue and the flagging of activity to the head of the list. --- zebra/interface.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'zebra/interface.c') diff --git a/zebra/interface.c b/zebra/interface.c index 7dc1b68d..cfcd5120 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -538,15 +538,25 @@ if_down (struct interface *ifp) if (p->family == AF_INET) connected_down_ipv4 (ifp, ifc); + } + } + + /* Examine all static routes which direct to the interface. */ + rib_update (); + #ifdef HAVE_IPV6 - else if (p->family == AF_INET6) + if (ifp->connected) + { + for (ALL_LIST_ELEMENTS (ifp->connected, node, next, ifc)) + { + p = ifc->address; + if (p->family == AF_INET6) connected_down_ipv6 (ifp, ifc); -#endif /* HAVE_IPV6 */ } } - /* Examine all static routes which direct to the interface. */ rib_update (); +#endif /* HAVE_IPV6 */ } void -- cgit v1.2.3