Revision b57a45b8

View differences:

proto/ospf/rt.c
29 29
  bird_clock_t delta;
30 30
  int age=0,flush=0;
31 31
  struct proto *p=&oa->po->proto;
32
  struct proto_ospf *po=oa->po;
32 33
  ip_addr ip;
33 34
  struct fib_iterator fit;
34 35
  struct ospf_lsa_net *ln;
......
45 46
  {
46 47
    en->color=OUTSPF;
47 48
    en->dist=LSINFINITY;
49
    en->nhi=NULL;
48 50
    if(age) ospf_age(en,delta,flush,oa);
49 51
  }
50 52

  
......
184 186
    else
185 187
    {
186 188
      /* Update routing table */
187
      if(nf->en->nhi!=NULL)
189
      if(nf->en->nhi==NULL)
190
      {
191
        struct top_hash_entry *en=nf->en;
192
        struct ospf_neighbor *neigh;
193
        neighbor *nn;
194

  
195
        if((neigh=find_neigh_noifa(po,en->lsa.rt))==NULL)
196
	{
197
	  goto skip;
198
	}
199
        nn=neigh_find(p,&neigh->ip,0);
200
        DBG("     Next hop calculated: %I\n", nn->addr);
201
        en->nh=nn->addr;
202
        en->nhi=nn->iface;
203
      }
204

  
188 205
      {
189 206
        net *ne;
190 207
        rta a0;
......
219 236
    }
220 237

  
221 238
  }
239
skip:
222 240
  FIB_ITERATE_END(nftmp);
223 241

  
224 242
}

Also available in: Unified diff