mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-31 22:35:25 +00:00
- A new server config option, 'do-reverse-updates', has been added
which causes the server to abstain from performing updates on PTR records. Thanks to a patch from Christof Chen at Allianz. [ISC-Bugs #16781]
This commit is contained in:
4
RELNOTES
4
RELNOTES
@@ -30,6 +30,10 @@ the README file.
|
|||||||
- Some uninitialized values were repaired in dhcpleasequery.c that
|
- Some uninitialized values were repaired in dhcpleasequery.c that
|
||||||
caused the server to abort.
|
caused the server to abort.
|
||||||
|
|
||||||
|
- A new server config option, 'do-reverse-updates', has been added
|
||||||
|
which causes the server to abstain from performing updates on PTR
|
||||||
|
records. Thanks to a patch from Christof Chen at Allianz.
|
||||||
|
|
||||||
Changes since 3.1.0a3
|
Changes since 3.1.0a3
|
||||||
|
|
||||||
- Some spelling fixes.
|
- Some spelling fixes.
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
Definitions for dhcpd... */
|
Definitions for dhcpd... */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
|
* Copyright (c) 2004-2007 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
@@ -545,6 +545,7 @@ struct lease_state {
|
|||||||
#define SV_DDNS_CONFLICT_DETECT 48
|
#define SV_DDNS_CONFLICT_DETECT 48
|
||||||
#define SV_LEASEQUERY 49
|
#define SV_LEASEQUERY 49
|
||||||
#define SV_ADAPTIVE_LEASE_TIME_THRESHOLD 50
|
#define SV_ADAPTIVE_LEASE_TIME_THRESHOLD 50
|
||||||
|
#define SV_DO_REVERSE_UPDATES 51
|
||||||
|
|
||||||
#if !defined (DEFAULT_PING_TIMEOUT)
|
#if !defined (DEFAULT_PING_TIMEOUT)
|
||||||
# define DEFAULT_PING_TIMEOUT 1
|
# define DEFAULT_PING_TIMEOUT 1
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
Dynamic DNS updates. */
|
Dynamic DNS updates. */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
|
* Copyright (c) 2004-2007 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 2000-2003 by Internet Software Consortium
|
* Copyright (c) 2000-2003 by Internet Software Consortium
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: ddns.c,v 1.24 2007/03/27 02:47:27 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
|
"$Id: ddns.c,v 1.25 2007/04/03 16:46:03 dhankins Exp $ Copyright (c) 2004-2007 Internet Systems Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -231,6 +231,7 @@ int ddns_updates (struct packet *packet,
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
isc_result_t rcode1 = ISC_R_SUCCESS, rcode2 = ISC_R_SUCCESS;
|
isc_result_t rcode1 = ISC_R_SUCCESS, rcode2 = ISC_R_SUCCESS;
|
||||||
int server_updates_a = 1;
|
int server_updates_a = 1;
|
||||||
|
int server_updates_ptr = 1;
|
||||||
struct buffer *bp = (struct buffer *)0;
|
struct buffer *bp = (struct buffer *)0;
|
||||||
int ignorep = 0, client_ignorep = 0;
|
int ignorep = 0, client_ignorep = 0;
|
||||||
|
|
||||||
@@ -467,6 +468,17 @@ int ddns_updates (struct packet *packet,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* CC: see if we are configured NOT to do reverse ptr updates
|
||||||
|
*/
|
||||||
|
if ((oc = lookup_option (&server_universe, state -> options,
|
||||||
|
SV_DO_REVERSE_UPDATES)) &&
|
||||||
|
!evaluate_boolean_option_cache (&ignorep, packet, lease,
|
||||||
|
(struct client_state *)0,
|
||||||
|
packet -> options,
|
||||||
|
state -> options,
|
||||||
|
&lease -> scope, oc, MDL)) {
|
||||||
|
server_updates_ptr = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Compute the reverse IP name.
|
* Compute the reverse IP name.
|
||||||
@@ -561,7 +573,7 @@ int ddns_updates (struct packet *packet,
|
|||||||
&ddns_dhcid, ddns_ttl, 0, conflict);
|
&ddns_dhcid, ddns_ttl, 0, conflict);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rcode1 == ISC_R_SUCCESS) {
|
if (rcode1 == ISC_R_SUCCESS && server_updates_ptr) {
|
||||||
if (ddns_fwd_name.len && ddns_rev_name.len)
|
if (ddns_fwd_name.len && ddns_rev_name.len)
|
||||||
rcode2 = ddns_update_ptr (&ddns_fwd_name,
|
rcode2 = ddns_update_ptr (&ddns_fwd_name,
|
||||||
&ddns_rev_name, ddns_ttl);
|
&ddns_rev_name, ddns_ttl);
|
||||||
@@ -579,7 +591,7 @@ int ddns_updates (struct packet *packet,
|
|||||||
&ddns_dhcid);
|
&ddns_dhcid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rcode2 == ISC_R_SUCCESS) {
|
if (rcode2 == ISC_R_SUCCESS && server_updates_ptr) {
|
||||||
bind_ds_value (&lease -> scope, "ddns-rev-name",
|
bind_ds_value (&lease -> scope, "ddns-rev-name",
|
||||||
&ddns_rev_name);
|
&ddns_rev_name);
|
||||||
}
|
}
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
Tables of information only used by server... */
|
Tables of information only used by server... */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
* Copyright (c) 2004-2007 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1995-2003 by Internet Software Consortium
|
* Copyright (c) 1995-2003 by Internet Software Consortium
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: stables.c,v 1.35 2007/01/05 23:19:22 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
"$Id: stables.c,v 1.36 2007/04/03 16:46:03 dhankins Exp $ Copyright (c) 2004-2007 Internet Systems Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -236,6 +236,7 @@ static struct option server_options[] = {
|
|||||||
{ "update-conflict-detection", "f", &server_universe, 48, 1 },
|
{ "update-conflict-detection", "f", &server_universe, 48, 1 },
|
||||||
{ "leasequery", "f", &server_universe, 49, 1 },
|
{ "leasequery", "f", &server_universe, 49, 1 },
|
||||||
{ "adaptive-lease-time-threshold", "B", &server_universe, 50, 1 },
|
{ "adaptive-lease-time-threshold", "B", &server_universe, 50, 1 },
|
||||||
|
{ "do-reverse-updates", "f", &server_universe, 51, 1 },
|
||||||
{ NULL, NULL, NULL, 0, 0 }
|
{ NULL, NULL, NULL, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user