diff options
author | LaMont Jones <lamont@debian.org> | 2008-03-10 11:38:41 -0600 |
---|---|---|
committer | LaMont Jones <lamont@mmjgroup.com> | 2013-08-17 06:58:52 -0600 |
commit | 04108496d454eb843978fe6aaa515686043579e0 (patch) | |
tree | e2ab447de235e518322939346ef87f9ba6592afa /bin | |
parent | 52e4767ae0421d1b480f7c09df7082ca97a9bce2 (diff) | |
download | bind9-04108496d454eb843978fe6aaa515686043579e0.tar.gz |
add "order random_1" support (return one random RR)
Clients who implement RFC 3484, Section 6, Rule 9 for IPv4 addresses
create serious issues for domains that use rrset-order cyclic or random to do
load balancing, since they erroneously decide that the host with the longest
prefix in common with their own address is "closest", while no such relationship
exists in IPv4.
While technically incorrect, returning exactly one A RR from a random ordering
works around this behavior. Using a short TTL is a good idea, for fault
tollerance.
Signed-off-by: LaMont Jones <lamont@ubuntu.com>
Diffstat (limited to 'bin')
-rw-r--r-- | bin/named/server.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/named/server.c b/bin/named/server.c index 77a6b5d8..d0a9b3cc 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -1082,6 +1082,8 @@ configure_order(dns_order_t *order, const cfg_obj_t *ent) { mode = DNS_RDATASETATTR_FIXEDORDER; else if (!strcasecmp(str, "random")) mode = DNS_RDATASETATTR_RANDOMIZE; + else if (!strcasecmp(str, "random_1")) + mode = DNS_RDATASETATTR_RANDOMIZE|DNS_RDATASETATTR_SINGLE; else if (!strcasecmp(str, "cyclic")) mode = 0; else |