]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
add a null check to avoid primary crash on contact with secondary [rt19705]
authorPaul Selkirk <pselkirk@isc.org>
Thu, 16 Jul 2009 19:48:45 +0000 (19:48 +0000)
committerPaul Selkirk <pselkirk@isc.org>
Thu, 16 Jul 2009 19:48:45 +0000 (19:48 +0000)
RELNOTES
server/failover.c

index 2c861576f9723696b915b5d4b13cf66b1e71efc3..476c8621819abda4b997d656c2eedccba5721143 100644 (file)
--- 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
index 795f896a66a331c332341eb1f0f42156d5d367c5..3bcfc23c56c82ca7f5b1a3781142069187c3a608 100644 (file)
@@ -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