summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-07-23 09:44:02 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-07-23 09:44:02 -0700
commit09523599d75b0161bbfff62bde436e4782a5864e (patch)
treee7d888909baa1b120438ce751a779cec3dc42d7b
parentfbfc5c7d7f6045065f210ecf1cd4fd19bcf6296a (diff)
downloadquagga-09523599d75b0161bbfff62bde436e4782a5864e.tar.bz2
quagga-09523599d75b0161bbfff62bde436e4782a5864e.tar.xz
Only set ifindex on set pass
This makes code work like comments and probable original design.
-rw-r--r--zebra/zebra_rib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 73f9e069..145005d3 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -437,7 +437,7 @@ nexthop_active_ipv4 (struct rib *rib, struct nexthop *nexthop, int set,
return 0; /* dead route */
/* recursive route, remember index */
- if (nexthop->type == NEXTHOP_TYPE_IPV4)
+ if (set && nexthop->type == NEXTHOP_TYPE_IPV4)
nexthop->ifindex = newhop->ifindex;
if (nexthop_isactive (newhop))
@@ -556,7 +556,7 @@ nexthop_active_ipv6 (struct rib *rib, struct nexthop *nexthop, int set,
return 0; /* dead route */
/* recursive route, remember index */
- if (nexthop->type == NEXTHOP_TYPE_IPV6)
+ if (set && nexthop->type == NEXTHOP_TYPE_IPV6)
nexthop->ifindex = newhop->ifindex;
if (nexthop_isactive (newhop))