diff options
author | Paul Selkirk <pselkirk@isc.org> | 2009-07-16 19:51:35 +0000 |
---|---|---|
committer | Paul Selkirk <pselkirk@isc.org> | 2009-07-16 19:51:35 +0000 |
commit | 30723572cee191fa589c0ebdbaf85616204f1178 (patch) | |
tree | 3d5e538e66dab1a0b89100536c43b18c2c9d6a25 | |
parent | f457da5ff36978d05a1af12126c6854f1ebe759f (diff) | |
download | isc-dhcp-30723572cee191fa589c0ebdbaf85616204f1178.tar.gz |
add a null check to avoid primary crash on contact with secondary [rt19705]
-rw-r--r-- | RELNOTES | 4 | ||||
-rw-r--r-- | server/failover.c | 5 |
2 files changed, 7 insertions, 2 deletions
@@ -103,6 +103,10 @@ the README file. supported. Note that, similarly to 3.0.x, for by-code lookups only the last option definition is used. +- Fixed a bug where a time difference of greater than 60 seconds between a + failover pair could cause the primary to crash on contact with the + secondary. Thanks to a patch from Steinar Haug. + Changes since 3.1.2rc1 - None. diff --git a/server/failover.c b/server/failover.c index 0f7eb42c..c830c894 100644 --- a/server/failover.c +++ b/server/failover.c @@ -34,7 +34,7 @@ #ifndef lint static char copyright[] = -"$Id: failover.c,v 1.63.56.22 2009/05/21 00:06:36 dhankins Exp $ Copyright (c) 2004-2008 Internet Systems Consortium. All rights reserved.\n"; +"$Id: failover.c,v 1.63.56.23 2009/07/16 19:51:34 pselkirk Exp $ Copyright (c) 2004-2008 Internet Systems Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -594,7 +594,8 @@ isc_result_t dhcp_failover_link_signal (omapi_object_t *h, omapi_signal ((omapi_object_t *)link -> state_object, "message", link); link -> state = dhcp_flink_message_length_wait; - failover_message_dereference (&link -> imsg, MDL); + if (link -> imsg) + failover_message_dereference (&link -> imsg, MDL); /* XXX This is dangerous because we could get into a tight XXX loop reading input without servicing any other stuff. XXX There needs to be a way to relinquish control but |