Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/dhcp Fix up some failover dependencies



details:   https://anonhg.NetBSD.org/src/rev/22e1e7eed846
branches:  trunk
changeset: 487648:22e1e7eed846
user:      mellon <mellon%NetBSD.org@localhost>
date:      Sat Jun 10 18:31:11 2000 +0000

description:
Fix up some failover dependencies

diffstat:

 usr.sbin/dhcp/includes/dhcpd.h    |  15 ++++++++++++++-
 usr.sbin/dhcp/includes/failover.h |  13 -------------
 usr.sbin/dhcp/server/dhcpd.c      |   4 +++-
 3 files changed, 17 insertions(+), 15 deletions(-)

diffs (81 lines):

diff -r eb756457d460 -r 22e1e7eed846 usr.sbin/dhcp/includes/dhcpd.h
--- a/usr.sbin/dhcp/includes/dhcpd.h    Sat Jun 10 18:29:27 2000 +0000
+++ b/usr.sbin/dhcp/includes/dhcpd.h    Sat Jun 10 18:31:11 2000 +0000
@@ -234,6 +234,19 @@
        u_int8_t hbuf [17];
 };
 
+/* Lease states: */
+typedef enum {
+       FTS_FREE = 1,
+       FTS_ACTIVE = 2,
+       FTS_EXPIRED = 3,
+       FTS_RELEASED = 4,
+       FTS_ABANDONED = 5,
+       FTS_RESET = 6,
+       FTS_BACKUP = 7,
+       FTS_RESERVED = 8,
+       FTS_BOOTP = 9
+} binding_state_t;
+
 /* A dhcp lease declaration structure. */
 struct lease {
        OMAPI_OBJECT_PREAMBLE;
@@ -502,10 +515,10 @@
        struct lease *backup;
        struct lease *abandoned;
        TIME next_event_time;
-#if defined (FAILOVER_PROTOCOL)
        int lease_count;
        int free_leases;
        int backup_leases;
+#if defined (FAILOVER_PROTOCOL)
        dhcp_failover_state_t *failover_peer;
 #endif
 };
diff -r eb756457d460 -r 22e1e7eed846 usr.sbin/dhcp/includes/failover.h
--- a/usr.sbin/dhcp/includes/failover.h Sat Jun 10 18:29:27 2000 +0000
+++ b/usr.sbin/dhcp/includes/failover.h Sat Jun 10 18:31:11 2000 +0000
@@ -156,19 +156,6 @@
 #define FTR_HBA_CONFLICT       19
 #define FTR_UNKNOWN            254
 
-/* Lease states: */
-typedef enum {
-       FTS_FREE = 1,
-       FTS_ACTIVE = 2,
-       FTS_EXPIRED = 3,
-       FTS_RELEASED = 4,
-       FTS_ABANDONED = 5,
-       FTS_RESET = 6,
-       FTS_BACKUP = 7,
-       FTS_RESERVED = 8,
-       FTS_BOOTP = 9
-} binding_state_t;
-
 #define DHCP_FAILOVER_MAX_MESSAGE_SIZE 2048
 
 typedef struct {
diff -r eb756457d460 -r 22e1e7eed846 usr.sbin/dhcp/server/dhcpd.c
--- a/usr.sbin/dhcp/server/dhcpd.c      Sat Jun 10 18:29:27 2000 +0000
+++ b/usr.sbin/dhcp/server/dhcpd.c      Sat Jun 10 18:31:11 2000 +0000
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char ocopyright[] =
-"$Id: dhcpd.c,v 1.16 2000/06/10 18:17:22 mellon Exp $ Copyright 1995-2000 Internet Software Consortium.";
+"$Id: dhcpd.c,v 1.17 2000/06/10 18:31:11 mellon Exp $ Copyright 1995-2000 Internet Software Consortium.";
 #endif
 
   static char copyright[] =
@@ -610,8 +610,10 @@
        }
 
        if (!lp -> state) {
+#if defined (FAILOVER_PROTOCOL)
                if (!lp -> pool ||
                    !lp -> pool -> failover_peer)
+#endif
                        log_debug ("ICMP Echo Reply for %s late or spurious.",
                                   piaddr (from));
                goto out;



Home | Main Index | Thread Index | Old Index