Revision f623ab98 proto/ospf/topology.c

View differences:

proto/ospf/topology.c
233 233
  WALK_LIST(ifa, po->iface_list)
234 234
  {
235 235
    int net_lsa = 0;
236
    u32 link_cost = po->stub_router ? 0xffff : ifa->cost;
236 237

  
237 238
    if ((ifa->type == OSPF_IT_VLINK) && (ifa->voa == oa) &&
238 239
	(!EMPTY_LIST(ifa->neigh_list)))
......
268 269
	     * this address as a next-hop.
269 270
	     */
270 271
	    ln->data = ipa_to_u32(ifa->addr->ip);
271

  
272
	    ln->metric = ifa->cost;
272
	    ln->metric = link_cost;
273 273
	    ln->padding = 0;
274 274
	    i++;
275 275
	  }
......
283 283
	    ln->type = LSART_NET;
284 284
	    ln->id = ipa_to_u32(ifa->drip);
285 285
	    ln->data = ipa_to_u32(ifa->addr->ip);
286
	    ln->metric = ifa->cost;
286
	    ln->metric = link_cost;
287 287
	    ln->padding = 0;
288 288
	    i++;
289 289
	    net_lsa = 1;
......
298 298
	  ln->type = LSART_VLNK;
299 299
	  ln->id = neigh->rid;
300 300
	  ln->data = ipa_to_u32(ifa->addr->ip);
301
	  ln->metric = ifa->cost;
301
	  ln->metric = link_cost;
302 302
	  ln->padding = 0;
303 303
	  i++;
304 304
        }

Also available in: Unified diff