Revision b2b84359

View differences:

proto/babel/babel.c
471 471

  
472 472
  if (r)
473 473
  {
474
    rta a0 = {
474
    rta *ap0 = allocz(RTA_MAX_SIZE);
475
    *ap0 = (rta) {
475 476
      .src = p->p.main_source,
476 477
      .source = RTS_BABEL,
477 478
      .scope = SCOPE_UNIVERSE,
478
      .cast = RTC_UNICAST,
479
      .dest = r->metric == BABEL_INFINITY ? RTD_UNREACHABLE : RTD_ROUTER,
480
      .flags = 0,
479
      .dest = r->metric == BABEL_INFINITY ? RTD_UNREACHABLE : RTD_UNICAST,
481 480
      .from = r->neigh->addr,
482
      .iface = r->neigh->ifa->iface,
481
      .nh.iface = r->neigh->ifa->iface,
483 482
    };
484 483

  
485 484
    if (r->metric < BABEL_INFINITY)
486
      a0.gw = r->next_hop;
485
      ap0->nh.gw = r->next_hop;
487 486

  
488
    rta *a = rta_lookup(&a0);
487
    rta *a = rta_lookup(ap0);
489 488
    rte *rte = rte_get_temp(a);
490 489
    rte->u.babel.metric = r->metric;
491 490
    rte->u.babel.router_id = r->router_id;

Also available in: Unified diff