summaryrefslogtreecommitdiff
path: root/proto/rip
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2000-01-26 12:07:18 +0000
committerPavel Machek <pavel@ucw.cz>2000-01-26 12:07:18 +0000
commit8660913ba83d66491caf407a7e6eb16a4eeda2d0 (patch)
treed0963fff35d7183dc29a8ed7532135f5cac96eec /proto/rip
parent7211be1cffdee84fd15e8b6b2a07a644948f1455 (diff)
Output made prettier.
Diffstat (limited to 'proto/rip')
-rw-r--r--proto/rip/rip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/proto/rip/rip.c b/proto/rip/rip.c
index b8338a5e..6e3f8cdd 100644
--- a/proto/rip/rip.c
+++ b/proto/rip/rip.c
@@ -521,9 +521,10 @@ rip_dump(struct proto *p)
}
static void
-rip_get_route_info(rte *rte, char *buf)
+rip_get_route_info(rte *rte, byte *buf)
{
- sprintf(buf, "(%d/%d) t%04x", rte->u.rip.metric, rte->pref, rte->u.rip.tag );
+ buf += sprintf(buf, " (%d/%d)", rte->pref, rte->u.rip.metric );
+ sprintf(buf, " t%04x", rte->u.rip.tag );
}
static int
@@ -580,6 +581,7 @@ new_iface(struct proto *p, struct iface *new, unsigned long flags, struct iface_
rif->sock->ttl = 30;
rif->sock->tos = IP_PREC_INTERNET_CONTROL;
+
if (flags & IF_BROADCAST)
rif->sock->daddr = new->addr->brd;
if (flags & IF_UNNUMBERED) {