diff options
Diffstat (limited to 'proto')
-rw-r--r-- | proto/rip/rip.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/proto/rip/rip.c b/proto/rip/rip.c index 022d499f..b3546ae4 100644 --- a/proto/rip/rip.c +++ b/proto/rip/rip.c @@ -535,10 +535,14 @@ rip_dump(struct proto *p) } static void -rip_get_route_info(rte *rte, byte *buf) +rip_get_route_info(rte *rte, byte *buf, ea_list *attrs) { - buf += bsprintf(buf, " (%d/%d)", rte->pref, rte->u.rip.metric ); - bsprintf(buf, " t%04x", rte->u.rip.tag ); + eattr *metric = ea_find(attrs, EA_RIP_METRIC); + eattr *tag = ea_find(attrs, EA_RIP_TAG); + + buf += bsprintf(buf, " (%d/%d)", rte->pref, metric ? metric->u.data : 0); + if (tag && tag->u.data) + bsprintf(buf, " t%04x", tag->u.data); } static int |