summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-04-28 09:53:28 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-04-28 09:53:28 -0700
commite2407bd233f2397843b4bde9cd3e4bdc6d144c1b (patch)
treecc731d80416e08e32636cb3799e241badb0ca4a6
parent7f577357dcf4da0864452ed0662afcefa380b590 (diff)
parentdf7ff29201ccfeb39f0cf5112930aae2f30bb5ec (diff)
downloadquagga-e2407bd233f2397843b4bde9cd3e4bdc6d144c1b.tar.bz2
quagga-e2407bd233f2397843b4bde9cd3e4bdc6d144c1b.tar.xz
Merge branch 'glendale' of suva.vyatta.com:/git/vyatta-quagga into glendale
-rw-r--r--zebra/zebra_rib.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 77406b0c..5de320d9 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -428,6 +428,17 @@ nexthop_active_ipv4 (struct rib *rib, struct nexthop *nexthop, int set,
|| newhop->type == NEXTHOP_TYPE_IFNAME
|| newhop->type == NEXTHOP_TYPE_IPV4_IFINDEX)
nexthop->rifindex = newhop->ifindex;
+
+ if (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)
+ {
+ ifp = if_lookup_by_name(newhop->ifname);
+ return (ifp && if_is_operative (ifp));
+ }
}
return 1;
}
@@ -539,6 +550,17 @@ nexthop_active_ipv6 (struct rib *rib, struct nexthop *nexthop, int set,
|| newhop->type == NEXTHOP_TYPE_IPV6_IFINDEX
|| newhop->type == NEXTHOP_TYPE_IPV6_IFNAME)
nexthop->rifindex = newhop->ifindex;
+
+ 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)
+ {
+ ifp = if_lookup_by_name(newhop->ifname);
+ return (ifp && if_is_operative (ifp));
+ }
}
return 1;
}