diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-07-07 14:06:57 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-07-07 14:06:57 -0700 |
commit | 28de8497e34585088d74d739d8f6d9ca27eb311d (patch) | |
tree | b05f927bf46989bd6823fcb548bede42c951321e /zebra/zebra_rib.c | |
parent | ea3c82455b7fac4dc63685620a6b4a5c739c458c (diff) | |
download | quagga-28de8497e34585088d74d739d8f6d9ca27eb311d.tar.bz2 quagga-28de8497e34585088d74d739d8f6d9ca27eb311d.tar.xz |
active static route changes for ipv6
This is the IPV6 analog to earlier changes to IPV4 static route
management.
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r-- | zebra/zebra_rib.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 3d3a2c8f..5acb644d 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -528,19 +528,25 @@ nexthop_active_ipv6 (struct rib *rib, struct nexthop *nexthop, int set, /* Directly point connected route. */ newhop = match->nexthop; - if (newhop && nexthop->type == NEXTHOP_TYPE_IPV6) - nexthop->ifindex = newhop->ifindex; - else if (newhop && newhop->type == NEXTHOP_TYPE_IFINDEX) - { - ifp = if_lookup_by_index (newhop->ifindex); - return (ifp && if_is_operative (ifp)); - } - else if (newhop && newhop->type == NEXTHOP_TYPE_IFNAME) + if (newhop) { - ifp = if_lookup_by_name(newhop->ifname); - return (ifp && if_is_operative (ifp)); - } + if (nexthop->type == NEXTHOP_TYPE_IPV4) + nexthop->ifindex = newhop->ifindex; + if (newhop->type == NEXTHOP_TYPE_IFINDEX || + newhop->type == NEXTHOP_TYPE_IPV4_IFINDEX) + { + ifp = if_lookup_by_index (newhop->ifindex); + return (ifp && if_is_operative (ifp)); + } + + if (newhop->type == NEXTHOP_TYPE_IFNAME || + newhop->type == NEXTHOP_TYPE_IPV4_IFNAME) + { + ifp = if_lookup_by_name(newhop->ifname); + return (ifp && if_is_operative (ifp)); + } + } return 1; } else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_INTERNAL)) |