summaryrefslogtreecommitdiff
path: root/isisd/isis_adjacency.c
diff options
context:
space:
mode:
authorhasso <hasso>2003-12-23 11:51:08 +0000
committerhasso <hasso>2003-12-23 11:51:08 +0000
commit2097cd8a7a1322b2853f1b9cbbe7f39c436f553e (patch)
treeab849230440ac6429f6d2caea41d36cb893f0c8d /isisd/isis_adjacency.c
parent5a514b14c706d671a041862c072af08a2baab98e (diff)
Some fixes to isisd done by me and Cougar in the spring of 2003. See
changelog for details.
Diffstat (limited to 'isisd/isis_adjacency.c')
-rw-r--r--isisd/isis_adjacency.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/isisd/isis_adjacency.c b/isisd/isis_adjacency.c
index 8079bd17..de747692 100644
--- a/isisd/isis_adjacency.c
+++ b/isisd/isis_adjacency.c
@@ -146,7 +146,7 @@ isis_delete_adj (struct isis_adjacency *adj, struct list *adjdb)
if (adj2 == adj)
break;
}
- listnode_delete (adjdb, node);
+ listnode_delete (adjdb, adj);
}
if (adj->ipv4_addrs)
@@ -336,7 +336,10 @@ isis_adj_print_vty2 (struct isis_adjacency *adj, struct vty *vty, char detail)
vty_out (vty, "%-3u", adj->level); /* level */
vty_out (vty, "%-13s", adj_state2string (adj->adj_state));
now = time (NULL);
- vty_out (vty, "%-9lu", adj->last_upd + adj->hold_time - now);
+ if (adj->last_upd)
+ vty_out (vty, "%-9lu", adj->last_upd + adj->hold_time - now);
+ else
+ vty_out (vty, "- ");
vty_out (vty, "%-10s", snpa_print (adj->snpa));
vty_out (vty, "%s", VTY_NEWLINE);
}
@@ -352,8 +355,12 @@ isis_adj_print_vty2 (struct isis_adjacency *adj, struct vty *vty, char detail)
vty_out (vty, ", Level: %u", adj->level); /* level */
vty_out (vty, ", State: %s", adj_state2string (adj->adj_state));
now = time (NULL);
- vty_out (vty, ", Expires in %s",
- time2string (adj->last_upd + adj->hold_time - now));
+ if (adj->last_upd)
+ vty_out (vty, ", Expires in %s",
+ time2string (adj->last_upd + adj->hold_time - now));
+ else
+ vty_out (vty, ", Expires in %s",
+ time2string (adj->hold_time));
vty_out (vty, "%s Adjacency flaps: %u",
VTY_NEWLINE,
adj->flaps);