summaryrefslogtreecommitdiffstats
path: root/nest
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-04-01 11:16:42 +0200
committerMartin Mares <mj@ucw.cz>2000-04-01 11:16:42 +0200
commit85810613993913831822b84ab7a9792a88fc7a8f (patch)
tree5fa74974f9feda20acfc599e37257993d035abe1 /nest
parent798df5b1ab6b497d8d9d6d51764f5aef4eb2d567 (diff)
downloadbird-85810613993913831822b84ab7a9792a88fc7a8f.tar
bird-85810613993913831822b84ab7a9792a88fc7a8f.zip
When tracing, always print incoming part of the trace before the outgoing one.
Avoid buffer overflows in `show routes' command.
Diffstat (limited to 'nest')
-rw-r--r--nest/rt-table.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index d04d06e..3daa836 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -284,10 +284,10 @@ rte_recalculate(rtable *table, net *net, struct proto *p, rte *new, ea_list *tmp
if (new && rte_better(new, old_best)) /* It's a new optimal route => announce and relink it */
{
+ rte_trace_in(D_ROUTES, p, new, "added [best]");
rte_announce(table, net, new, old_best, tmpa);
new->next = net->routes;
net->routes = new;
- rte_trace_in(D_ROUTES, p, new, "added [best]");
}
else
{
@@ -659,7 +659,7 @@ rt_format_via(rte *e, byte *via)
static void
rt_show_rte(struct cli *c, byte *ia, rte *e, struct rt_show_data *d)
{
- byte via[STD_ADDRESS_P_LENGTH+32], from[STD_ADDRESS_P_LENGTH];
+ byte via[STD_ADDRESS_P_LENGTH+32], from[STD_ADDRESS_P_LENGTH+6];
byte tm[TM_RELTIME_BUFFER_SIZE], info[256];
rta *a = e->attrs;