Revision fe9f1a6d sysdep/unix/krt.c

View differences:

sysdep/unix/krt.c
297 297
krt_trace_in(struct krt_proto *p, rte *e, char *msg)
298 298
{
299 299
  if (p->p.debug & D_PACKETS)
300
    log(L_TRACE "%s: %I/%d: %s", p->p.name, e->net->n.prefix, e->net->n.pxlen, msg);
300
    log(L_TRACE "%s: %N: %s", p->p.name, e->net->n.addr, msg);
301 301
}
302 302

  
303 303
static inline void
304 304
krt_trace_in_rl(struct tbf *f, struct krt_proto *p, rte *e, char *msg)
305 305
{
306 306
  if (p->p.debug & D_PACKETS)
307
    log_rl(f, L_TRACE "%s: %I/%d: %s", p->p.name, e->net->n.prefix, e->net->n.pxlen, msg);
307
    log_rl(f, L_TRACE "%s: %N: %s", p->p.name, e->net->n.addr, msg);
308 308
}
309 309

  
310 310
/*
......
347 347
  net *n = e->net;
348 348
  rta *aa = rta_clone(e->attrs);
349 349
  rte *ee = rte_get_temp(aa);
350
  net *nn = net_get(p->p.table, n->n.prefix, n->n.pxlen);
350
  net *nn = net_get(p->p.table, n->n.addr);
351 351
  ee->net = nn;
352 352
  ee->pflags = 0;
353 353
  ee->pref = p->p.preference;
......
358 358
static void
359 359
krt_learn_announce_delete(struct krt_proto *p, net *n)
360 360
{
361
  n = net_find(p->p.table, n->n.prefix, n->n.pxlen);
361
  n = net_find(p->p.table, n->n.addr);
362 362
  rte_update(&p->p, n, NULL);
363 363
}
364 364

  
......
367 367
krt_learn_scan(struct krt_proto *p, rte *e)
368 368
{
369 369
  net *n0 = e->net;
370
  net *n = net_get(&p->krt_table, n0->n.prefix, n0->n.pxlen);
370
  net *n = net_get(&p->krt_table, n0->n.addr);
371 371
  rte *m, **mm;
372 372

  
373 373
  e->attrs = rta_lookup(e->attrs);
......
469 469
krt_learn_async(struct krt_proto *p, rte *e, int new)
470 470
{
471 471
  net *n0 = e->net;
472
  net *n = net_get(&p->krt_table, n0->n.prefix, n0->n.pxlen);
472
  net *n = net_get(&p->krt_table, n0->n.addr);
473 473
  rte *g, **gg, *best, **bestp, *old_best;
474 474

  
475 475
  e->attrs = rta_lookup(e->attrs);

Also available in: Unified diff