diff options
author | Joakim Tjernlund <Joakim.Tjernlund@transmode.se> | 2009-06-24 19:15:36 +0200 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2009-06-24 22:43:58 +0100 |
commit | c3a5606302777cdd33d4025fc30bed723fc84d79 (patch) | |
tree | afa5d20dd20d6a05f99107655ce68d8788f847cc /zebra | |
parent | 3f4ab7f9e9ffaee7c448744f45d6e5e2176cce89 (diff) |
zebra: Static route does not reach kernel.
A static route like below: ip route 172.16.1.0/30 192.168.101.162 11
does not move properly to a new interface when the
interface used goes down. Zebra reports that it have
moved but kernel isn't informed so the route is lost.
* zebra_rib.c: (nexthop_active_update) if ifindex has changed, then the
route should be considered to have changed.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/zebra_rib.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index e2108fcb..e11afaf1 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -905,7 +905,7 @@ static int nexthop_active_update (struct route_node *rn, struct rib *rib, int set) { struct nexthop *nexthop; - int prev_active, new_active; + int prev_active, prev_index, new_active; rib->nexthop_active_num = 0; UNSET_FLAG (rib->flags, ZEBRA_FLAG_CHANGED); @@ -913,9 +913,11 @@ nexthop_active_update (struct route_node *rn, struct rib *rib, int set) for (nexthop = rib->nexthop; nexthop; nexthop = nexthop->next) { prev_active = CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE); + prev_index = nexthop->ifindex; if ((new_active = nexthop_active_check (rn, rib, nexthop, set))) rib->nexthop_active_num++; - if (prev_active != new_active) + if (prev_active != new_active || + prev_index != nexthop->ifindex) SET_FLAG (rib->flags, ZEBRA_FLAG_CHANGED); } return rib->nexthop_active_num; |