Better formatting of router ID's.
This commit is contained in:
parent
ebd3720f83
commit
dbf3939a53
1 changed files with 5 additions and 1 deletions
|
@ -285,7 +285,11 @@ ea_format(eattr *e, byte *buf)
|
||||||
bsprintf(buf, "%I", *(ip_addr *) ad->data);
|
bsprintf(buf, "%I", *(ip_addr *) ad->data);
|
||||||
break;
|
break;
|
||||||
case EAF_TYPE_ROUTER_ID:
|
case EAF_TYPE_ROUTER_ID:
|
||||||
bsprintf(buf, "%08x", e->u.data); /* FIXME: Better printing of router ID's */
|
bsprintf(buf, "%d.%d.%d.%d",
|
||||||
|
(e->u.data >> 24) & 0xff,
|
||||||
|
(e->u.data >> 16) & 0xff,
|
||||||
|
(e->u.data >> 8) & 0xff,
|
||||||
|
e->u.data & 0xff);
|
||||||
break;
|
break;
|
||||||
case EAF_TYPE_AS_PATH:
|
case EAF_TYPE_AS_PATH:
|
||||||
as_path_format(ad, buf, end - buf);
|
as_path_format(ad, buf, end - buf);
|
||||||
|
|
Loading…
Reference in a new issue