]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[v4_1_esv] Fixed server unit test build issues with --disable-failover
authorThomas Markwalder <tmark@isc.org>
Fri, 25 Sep 2015 12:56:22 +0000 (08:56 -0400)
committerThomas Markwalder <tmark@isc.org>
Fri, 25 Sep 2015 12:56:22 +0000 (08:56 -0400)
    Merged rt40372.

RELNOTES
server/tests/load_bal_unittest.c

index e97fdb82b270a164f10cf08a7899687be1aebee9..c7ab255fc94063676b401f21c939ab6865bc29ea 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -60,6 +60,10 @@ by Eric Young (eay@cryptsoft.com).
 
                        Changes since 4.1-ESV-R12
 
+- Corrected compilation errors that prohibited building the server's 
+  ATF unit tests when failover is disabled.
+  [ISC-Bugs #40372]
+
 - Fixed several potential null references.  Thanks to Bill Parker
   (wp02855 at gmail dot com) who identified these issues and supplied
   patches to address them.
index 1500f34dcff190f404c1abb86819e0ed9c2d0bb2..0919a14fec6e95c2457e49203fec220aab4803c7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC")
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -52,6 +52,7 @@ ATF_TC_HEAD(load_balance, tc)
 
 ATF_TC_BODY(load_balance, tc)
 {
+#if defined(FAILOVER_PROTOCOL)
        struct packet packet;
        struct dhcp_packet raw;
        dhcp_failover_state_t pstate, sstate;
@@ -117,7 +118,9 @@ ATF_TC_BODY(load_balance, tc)
        if (load_balance_mine(&packet, &sstate) != 1) {
                atf_tc_fail("ERROR: secondary not accepted %s:%d", MDL);
        }
-       
+#else
+    atf_tc_skip("failover is disabled");
+#endif
 }
 
 ATF_TC(load_balance_swap);
@@ -130,6 +133,7 @@ ATF_TC_HEAD(load_balance_swap, tc)
 
 ATF_TC_BODY(load_balance_swap, tc)
 {
+#if defined(FAILOVER_PROTOCOL)
 #if defined(SECS_BYTEORDER)
        struct packet packet;
        struct dhcp_packet raw;
@@ -179,6 +183,9 @@ ATF_TC_BODY(load_balance_swap, tc)
 #else
        atf_tc_skip("SECS_BYTEORDER not defined");
 #endif
+#else
+       atf_tc_skip("failover is disabled");
+#endif
 }