summaryrefslogtreecommitdiff
path: root/isisd/isis_circuit.c
diff options
context:
space:
mode:
authorhasso <hasso>2004-12-29 19:34:22 +0000
committerhasso <hasso>2004-12-29 19:34:22 +0000
commit4660687a38034d60296fbc9e82aae772011c407f (patch)
tree5a0d7caea1ba0958c8f9780da038654ce4f10fed /isisd/isis_circuit.c
parent1d69fdf645d8434e8e1488f8bf0c73613df09da9 (diff)
Don't crash during interface up/down events.
Diffstat (limited to 'isisd/isis_circuit.c')
-rw-r--r--isisd/isis_circuit.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c
index c00e88f8..ca5befbd 100644
--- a/isisd/isis_circuit.c
+++ b/isisd/isis_circuit.c
@@ -191,8 +191,10 @@ isis_circuit_del (struct isis_circuit *circuit)
if (circuit->circ_type == CIRCUIT_T_BROADCAST)
{
/* destroy adjacency databases */
- list_delete (circuit->u.bc.adjdb[0]);
- list_delete (circuit->u.bc.adjdb[1]);
+ if (circuit->u.bc.adjdb[0])
+ list_delete (circuit->u.bc.adjdb[0]);
+ if (circuit->u.bc.adjdb[1])
+ list_delete (circuit->u.bc.adjdb[1]);
/* destroy neighbour lists */
if (circuit->u.bc.lan_neighs[0])
list_delete (circuit->u.bc.lan_neighs[0]);
@@ -428,7 +430,12 @@ void
isis_circuit_update_params (struct isis_circuit *circuit,
struct interface *ifp)
{
- assert (circuit);
+ /* HT: It can happen at the moment during interface up event because we
+ * actually delete circuit during interface down event. Should be really
+ * cleaned up. TODO */
+ /* assert (circuit); */
+ if (!circuit)
+ return;
if (circuit->circuit_id != ifp->ifindex)
{