Revision ce1da96e nest/rt-attr.c

View differences:

nest/rt-attr.c
380 380
  return h;
381 381
}
382 382

  
383
ea_list *
384
ea_append(ea_list *to, ea_list *what)
385
{
386
  ea_list *res;
387

  
388
  if (!to)
389
    return what;
390
  res = to;
391
  while (to->next)
392
    to = to->next;
393
  to->next = what;
394
  return res;
395
}
396

  
383 397
/*
384 398
 *	rta's
385 399
 */
......
551 565
}
552 566

  
553 567
void
554
rta_show(struct cli *c, rta *a)
568
rta_show(struct cli *c, rta *a, ea_list *eal)
555 569
{
556 570
  static char *src_names[] = { "dummy", "static", "inherit", "device", "static-device", "redirect",
557 571
			       "RIP", "RIP-ext", "OSPF", "OSPF-ext", "OSPF-IA", "OSPF-boundary",
558 572
			       "BGP" };
559 573
  static char *cast_names[] = { "unicast", "broadcast", "multicast", "anycast" };
560
  ea_list *eal;
561 574
  int i;
562 575
  byte buf[EA_FORMAT_BUF_SIZE];
563 576

  
564 577
  cli_printf(c, -1008, "\tType: %s %s %s", src_names[a->source], cast_names[a->cast], ip_scope_text(a->scope));
565
  for(eal=a->eattrs; eal; eal=eal->next)
578
  if (!eal)
579
    eal = a->eattrs;
580
  for(; eal; eal=eal->next)
566 581
    for(i=0; i<eal->count; i++)
567 582
      {
568 583
	ea_format(&eal->attrs[i], buf);

Also available in: Unified diff