summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>2002-02-20 07:18:41 +0000
committerTed Lemon <source@isc.org>2002-02-20 07:18:41 +0000
commit690bb8c8bbf88cd1903ec7271526358836acb09d (patch)
treeed65707d21402091cac1869f01e1f01aaa7bbc5e
parent0b2d2e941d847b9f6b4587e4d0cad11dbac626c3 (diff)
downloadisc-dhcp-690bb8c8bbf88cd1903ec7271526358836acb09d.tar.gz
Add a do-forward-updates flag that entirely disables A record updates.
-rw-r--r--server/ddns.c14
-rw-r--r--server/stables.c6
2 files changed, 16 insertions, 4 deletions
diff --git a/server/ddns.c b/server/ddns.c
index d5b4d6e5..7b433523 100644
--- a/server/ddns.c
+++ b/server/ddns.c
@@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
-"$Id: ddns.c,v 1.15.2.7 2002/02/09 03:28:27 mellon Exp $ Copyright (c) 2000-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: ddns.c,v 1.15.2.8 2002/02/20 07:18:35 mellon Exp $ Copyright (c) 2000-2001 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -288,6 +288,18 @@ int ddns_updates (struct packet *packet,
goto client_updates;
}
noclient:
+ /* If do-forward-updates is disabled, this basically means don't
+ do an update unless the client is participating, so if we get
+ here and do-forward-updates is disabled, we can stop. */
+ if ((oc = lookup_option (&server_universe, state -> options,
+ SV_DO_FORWARD_UPDATES)) &&
+ !evaluate_boolean_option_cache (&ignorep, packet, lease,
+ (struct client_state *)0,
+ packet -> options,
+ state -> options,
+ &lease -> scope, oc, MDL)) {
+ return 0;
+ }
/* If it's a static lease, then don't do the DNS update unless we're
specifically configured to do so. If the client asked to do its
diff --git a/server/stables.c b/server/stables.c
index 26190d79..3b9ea62b 100644
--- a/server/stables.c
+++ b/server/stables.c
@@ -3,7 +3,7 @@
Tables of information only used by server... */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
+ * Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
-"$Id: stables.c,v 1.25.2.4 2001/10/17 03:32:03 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: stables.c,v 1.25.2.5 2002/02/20 07:18:41 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -490,7 +490,7 @@ struct option server_options [256] = {
{ "ping-check", "f", &server_universe, 42 },
{ "update-static-leases", "f", &server_universe, 43 },
{ "log-facility", "Nsyslog-facilities.", &server_universe, 44 },
- { "#45", "X", &server_universe, 45 },
+ { "do-forward-updates", "f", &server_universe, 45 },
{ "#46", "X", &server_universe, 46 },
{ "#47", "X", &server_universe, 47 },
{ "#48", "X", &server_universe, 48 },