mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-30 13:57:50 +00:00
Report failure in the event of a lease conflict; notice if lease database rewrite fails
This commit is contained in:
parent
08804a9a44
commit
a0aee5f011
@ -400,6 +400,7 @@ int supersede_lease (comp, lease, commit)
|
||||
comp -> hardware_addr.hlen))))) {
|
||||
warn ("Lease conflict at %s",
|
||||
piaddr (comp -> ip_addr));
|
||||
return 0;
|
||||
} else {
|
||||
/* If there's a Unique ID, dissociate it from the hash
|
||||
table if necessary, and always free it. */
|
||||
@ -650,7 +651,8 @@ void write_leases ()
|
||||
write_lease (l);
|
||||
}
|
||||
}
|
||||
commit_leases ();
|
||||
if (!commit_leases ())
|
||||
error ("Can't commit leases to new database: %m");
|
||||
}
|
||||
|
||||
void dump_subnets ()
|
||||
|
4
memory.c
4
memory.c
@ -400,6 +400,7 @@ int supersede_lease (comp, lease, commit)
|
||||
comp -> hardware_addr.hlen))))) {
|
||||
warn ("Lease conflict at %s",
|
||||
piaddr (comp -> ip_addr));
|
||||
return 0;
|
||||
} else {
|
||||
/* If there's a Unique ID, dissociate it from the hash
|
||||
table if necessary, and always free it. */
|
||||
@ -650,7 +651,8 @@ void write_leases ()
|
||||
write_lease (l);
|
||||
}
|
||||
}
|
||||
commit_leases ();
|
||||
if (!commit_leases ())
|
||||
error ("Can't commit leases to new database: %m");
|
||||
}
|
||||
|
||||
void dump_subnets ()
|
||||
|
Loading…
x
Reference in New Issue
Block a user