diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-04-29 11:08:15 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-04-29 11:08:15 -0700 |
commit | d3ea74a99a3d2bcc66e45bef716ba0a66e24020e (patch) | |
tree | a74c218bc870d06ad27fc3d112e57c567e72b59c | |
parent | ccbba60205d0cf64fe12611e057d4581d40e4e22 (diff) | |
download | quagga-d3ea74a99a3d2bcc66e45bef716ba0a66e24020e.tar.bz2 quagga-d3ea74a99a3d2bcc66e45bef716ba0a66e24020e.tar.xz |
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.
-rw-r--r-- | zebra/interface.c | 16 |
1 files changed, 13 insertions, 3 deletions
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 |