Revision c27b2449 proto/ospf/rt.c

View differences:

proto/ospf/rt.c
38 38
  orta->ifa = NULL;
39 39
  orta->ar = NULL;
40 40
  orta->tag = 0;
41
  orta->rid = 0;
41 42
}
42 43

  
43 44
void
......
158 159
  nf.ar = en;
159 160
  nf.nh = en->nh;
160 161
  nf.ifa = en->nhi;
162
  nf.rid = en->lsa.rt;
161 163

  
162 164
  /* FIXME check nf.ifa on stubs */
163 165
  ri_install(oa->po, px, pxlen, ORT_NET, &nf, NULL);
......
256 258
	  nf.ar = act;
257 259
	  nf.nh = act->nh;
258 260
	  nf.ifa = act->nhi;
261
	  nf.rid = act->lsa.rt;
259 262

  
260 263
	  if (act == oa->rt)
261 264
	    {
......
373 376
      nf.ar = act;
374 377
      nf.nh = act->nh;
375 378
      nf.ifa = act->nhi;
379
      nf.rid = act->lsa.rt;
376 380
      ri_install(po, ipa_from_rid(act->lsa.rt), MAX_PREFIX_LENGTH, ORT_ROUTER, &nf, NULL);
377 381

  
378 382
#ifdef OSPFv2
......
610 614
    nf.ar = abr->n.ar;
611 615
    nf.nh = abr->n.nh;
612 616
    nf.ifa = abr->n.ifa;
617
    nf.rid = en->lsa.rt; /* ABR ID */
613 618
    ri_install(po, ip, pxlen, type, &nf, NULL);
614 619
  }
615 620
}
......
719 724
    nf.ar = abr->n.ar;
720 725
    nf.nh = abr->n.nh;
721 726
    nf.ifa = abr->n.ifa;
727
    nf.rid = en->lsa.rt; /* ABR ID */
722 728
    ri_install(po, ip, pxlen, type, &nf, NULL);
723 729
  }
724 730
}
......
961 967
    nfa.ar = nf1->n.ar;
962 968
    nfa.nh = nh;
963 969
    nfa.ifa = nhi;
970
    nfa.rid = en->lsa.rt;
964 971
    ri_install(po, ip, pxlen, ORT_NET, &nfa, nfh);
965 972
  }
966 973

  
......
1212 1219
        e->u.ospf.metric1 = nf->n.metric1;
1213 1220
        e->u.ospf.metric2 = nf->n.metric2;
1214 1221
        e->u.ospf.tag = nf->n.tag;
1222
        e->u.ospf.router_id = nf->n.rid;
1215 1223
        e->pflags = 0;
1216 1224
        e->net = ne;
1217 1225
        e->pref = p->preference;

Also available in: Unified diff