summaryrefslogtreecommitdiffstats
path: root/isisd/isis_pfpacket.c
diff options
context:
space:
mode:
authorFritz Reichmann <fritz@reichmann.nl>2009-07-21 19:05:24 +0000
committerDavid Lamparter <equinox@diac24.net>2010-02-03 05:09:28 +0100
commit4a77e9f7769adea74f1711c324fcdd63e0d6eee5 (patch)
tree20c97cc2f7a6b79e36dd0535481a67ddcc7a34e0 /isisd/isis_pfpacket.c
parentdca6c883ea6219460efbe3dadde4b8b9cb12c845 (diff)
downloadquagga-4a77e9f7769adea74f1711c324fcdd63e0d6eee5.tar.bz2
quagga-4a77e9f7769adea74f1711c324fcdd63e0d6eee5.tar.xz
isisd: fixes 1/7: bug #536: crash on apply/delete isis config
The crash is due to threads accessing data that gets destroyed during the removal of the configuration. * isis_circuit.c: Destroy adjacencies to stop adjacency expiry thread. Stop PSNP threads. * isisd.c: Change state of circuit back to INIT and reassing the circuit structure to isis->init_circ_list rather than destroying the circuit data structure. Stop SPF threads. Stop LSP generation threads. * isisd.h: Add pointers to LSP threads into area structure in order to stop them in isisd.c * isis_lsp.c: Store pointer to LSP thread in area structure. * isis_pdu.c: Stop PDU generation for a circuit with a removed area. * isis_pfpacket.c: Stop processing received PDUs for a circuit with a removed area.
Diffstat (limited to 'isisd/isis_pfpacket.c')
-rw-r--r--isisd/isis_pfpacket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/isisd/isis_pfpacket.c b/isisd/isis_pfpacket.c
index 8752dba5..9ada780e 100644
--- a/isisd/isis_pfpacket.c
+++ b/isisd/isis_pfpacket.c
@@ -231,6 +231,10 @@ isis_recv_pdu_bcast (struct isis_circuit *circuit, u_char * ssnpa)
LLC_LEN, MSG_PEEK,
(struct sockaddr *) &s_addr, (socklen_t *) &addr_len);
+ if (!circuit->area) {
+ return ISIS_OK;
+ }
+
if (bytesread < 0)
{
zlog_warn ("isis_recv_packet_bcast(): fd %d, recvfrom (): %s",