From d453265fd2286c25d4db73639c38d477efa4a1dc Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Thu, 16 Jul 2009 19:48:45 +0000 Subject: [PATCH] add a null check to avoid primary crash on contact with secondary [rt19705] --- RELNOTES | 4 ++++ server/failover.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/RELNOTES b/RELNOTES index 2c861576..476c8621 100644 --- a/RELNOTES +++ b/RELNOTES @@ -164,6 +164,10 @@ work on other platforms. Please report any problems and suggested fixes to 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 4.1.0b1 - A missing "else" in dhcrelay.c could have caused an interface not to diff --git a/server/failover.c b/server/failover.c index 795f896a..3bcfc23c 100644 --- a/server/failover.c +++ b/server/failover.c @@ -597,7 +597,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