]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- Move ddns_removals out of the on_release conditionals so that it actually
authorTed Lemon <source@isc.org>
Thu, 4 Jan 2001 00:30:53 +0000 (00:30 +0000)
committerTed Lemon <source@isc.org>
Thu, 4 Jan 2001 00:30:53 +0000 (00:30 +0000)
  happens.

server/mdb.c

index 7e81ec4833dc27816048cf5baa739eb1928bc81a..18c058b595465c350fe0d357710736953b46cc61 100644 (file)
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: mdb.c,v 1.47 2000/12/28 23:34:08 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: mdb.c,v 1.48 2001/01/04 00:30:53 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -1062,8 +1062,8 @@ void process_state_transition (struct lease *lease)
             lease -> binding_state == FTS_BOOTP ||
             lease -> binding_state == FTS_RESERVED) &&
            lease -> next_binding_state != FTS_RELEASED) {
+               ddns_removals (lease);
                if (lease -> on_expiry) {
-                       ddns_removals (lease);
                        execute_statements ((struct binding_value **)0,
                                            (struct packet *)0, lease,
                                            (struct client_state *)0,
@@ -1090,8 +1090,8 @@ void process_state_transition (struct lease *lease)
             lease -> binding_state == FTS_BOOTP ||
             lease -> binding_state == FTS_RESERVED) &&
            lease -> next_binding_state == FTS_RELEASED) {
+               ddns_removals (lease);
                if (lease -> on_release) {
-                       ddns_removals (lease);
                        execute_statements ((struct binding_value **)0,
                                            (struct packet *)0, lease,
                                            (struct client_state *)0,
@@ -1212,8 +1212,8 @@ void release_lease (lease, packet)
 {
        /* If there are statements to execute when the lease is
           released, execute them. */
+       ddns_removals (lease);
        if (lease -> on_release) {
-               ddns_removals (lease);
                execute_statements ((struct binding_value **)0,
                                    packet, lease, (struct client_state *)0,
                                    packet -> options,