summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2001-08-21 18:44:57 +0200
committerOndrej Filip <feela@network.cz>2001-08-21 18:44:57 +0200
commit68db89a2ce35a96aef827f4e86c5dfd82842f9d7 (patch)
treef44318a1fcfd0e324df70eef8c449f3586cd09ac
parent37da55168cdb0f562266eff4b821f6e576d93931 (diff)
downloadbird-68db89a2ce35a96aef827f4e86c5dfd82842f9d7.tar
bird-68db89a2ce35a96aef827f4e86c5dfd82842f9d7.zip
Finally, next hop problem fixed.
-rw-r--r--proto/ospf/rt.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c
index f48f604..366f9e5 100644
--- a/proto/ospf/rt.c
+++ b/proto/ospf/rt.c
@@ -235,14 +235,7 @@ again:
a0.flags=0;
a0.aflags=0;
a0.iface=en->nhi;
- if(ipa_in_net(en->nh,en->nhi->addr->ip,en->nhi->addr->pxlen))
- {
- a0.gw=IPA_NONE;
- }
- else
- {
- a0.gw=en->nh;
- }
+ a0.gw=en->nh;
ne=net_get(p->table, nf->fn.prefix, nf->fn.pxlen);
e=rte_get_temp(&a0);
@@ -654,6 +647,9 @@ calc_next_hop(struct top_hash_entry *en, struct top_hash_entry *par,
if(en->lsa.type==LSA_T_NET) bug("Parent for net is net?");
if((en->nhi=par->nhi)==NULL)
bug("Did not find next hop interface for INSPF lsa!");
+ if((neigh=find_neigh_noifa(po,en->lsa.rt))==NULL) return;
+ en->nhi=neigh->ifa->iface;
+ en->nh=neigh->ip; /* Yes, neighbor is it's own next hop */
return;
}
else /* Parent is some RT neighbor */