From: Paul Selkirk Date: Thu, 16 Jul 2009 19:48:45 +0000 (+0000) Subject: add a null check to avoid primary crash on contact with secondary [rt19705] X-Git-Tag: v4_2_0a1~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d453265fd2286c25d4db73639c38d477efa4a1dc;p=thirdparty%2Fdhcp.git add a null check to avoid primary crash on contact with secondary [rt19705] --- diff --git a/RELNOTES b/RELNOTES index 2c861576f..476c86218 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 795f896a6..3bcfc23c5 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