Revision ba5e5940 nest/rt-attr.c

View differences:

nest/rt-attr.c
362 362
    }
363 363
}
364 364

  
365
static int
366
get_generic_attr(eattr *a, byte **buf, int buflen UNUSED)
367
{
368
  if (a->id == EA_GEN_IGP_METRIC)
369
    {
370
      *buf += bsprintf(*buf, "igp_metric");
371
      return GA_NAME;
372
    }
373
 
374
  return GA_UNKNOWN;
375
}
376

  
365 377
/**
366 378
 * ea_format - format an &eattr for printing
367 379
 * @e: attribute to be formatted
......
392 404
    }
393 405
  else if (EA_PROTO(e->id))
394 406
    buf += bsprintf(buf, "%02x.", EA_PROTO(e->id));
407
  else 
408
    status = get_generic_attr(e, &buf, end - buf);
409

  
395 410
  if (status < GA_NAME)
396 411
    buf += bsprintf(buf, "%02x", EA_ID(e->id));
397 412
  if (status < GA_FULL)

Also available in: Unified diff