diff options
author | Andrew J. Schorr <ajschorr@alumni.princeton.edu> | 2008-01-08 20:12:46 +0000 |
---|---|---|
committer | Andrew J. Schorr <ajschorr@alumni.princeton.edu> | 2008-01-08 20:12:46 +0000 |
commit | 3f087670efa606021cde2f6a9615ac7e07aec2a5 (patch) | |
tree | c2d884aa51da1a95614380c813900e6f18a85c60 | |
parent | 912df1e8ab61962c29eb4faff17a7d75c4905b84 (diff) |
[link-detect] Static interface routes should behave properly with link-detect.
2008-01-08 Michael Larson <mike@vyatta.com>
* zebra_rib.c: (nexthop_active_check) Replace if_is_up with
if_is_operative to solve problems with static interface
routes not behaving properly with link-detect.
-rw-r--r-- | zebra/ChangeLog | 6 | ||||
-rw-r--r-- | zebra/zebra_rib.c | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/zebra/ChangeLog b/zebra/ChangeLog index 3ce7b9ea..3457c785 100644 --- a/zebra/ChangeLog +++ b/zebra/ChangeLog @@ -1,3 +1,9 @@ +2008-01-08 Michael Larson <mike@vyatta.com> + + * zebra_rib.c: (nexthop_active_check) Replace if_is_up with + if_is_operative to solve problems with static interface + routes not behaving properly with link-detect. + 2007-11-12 Denis Ovsienko * connected.c: (connected_up_ipv4, connected_down_ipv4, diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 37b84a66..e27c63bf 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -795,7 +795,7 @@ nexthop_active_check (struct route_node *rn, struct rib *rib, { case NEXTHOP_TYPE_IFINDEX: ifp = if_lookup_by_index (nexthop->ifindex); - if (ifp && if_is_up (ifp)) + if (ifp && if_is_operative(ifp)) SET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE); else UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE); @@ -804,7 +804,7 @@ nexthop_active_check (struct route_node *rn, struct rib *rib, family = AFI_IP6; case NEXTHOP_TYPE_IFNAME: ifp = if_lookup_by_name (nexthop->ifname); - if (ifp && if_is_up (ifp)) + if (ifp && if_is_operative(ifp)) { if (set) nexthop->ifindex = ifp->ifindex; @@ -838,7 +838,7 @@ nexthop_active_check (struct route_node *rn, struct rib *rib, if (IN6_IS_ADDR_LINKLOCAL (&nexthop->gate.ipv6)) { ifp = if_lookup_by_index (nexthop->ifindex); - if (ifp && if_is_up (ifp)) + if (ifp && if_is_operative(ifp)) SET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE); else UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE); |