From b31be3479606f0de1a0cbe946ed37abca3226b02 Mon Sep 17 00:00:00 2001 From: aland Date: Tue, 28 Aug 2007 08:23:21 +0000 Subject: [PATCH] Removed extraneous "hostname" configuration entry from realms --- raddb/proxy.conf | 25 ++++++++++++++----------- src/main/realms.c | 13 +++++-------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/raddb/proxy.conf b/raddb/proxy.conf index d3e6074..c5b2e88 100644 --- a/raddb/proxy.conf +++ b/raddb/proxy.conf @@ -117,7 +117,7 @@ home_server localhost { type = auth # - # Configure ONE OF the following three entries: + # Configure ONE OF the following two entries: # # IPv4 address # @@ -126,16 +126,19 @@ home_server localhost { # OR IPv6 address # ipv6addr = ::1 - # OR hostname, which will do address detection automatically - # - # Note that we do NOT recommend using hostnames, because - # it means that the server has to do a DNS lookup to - # determine the IP address of the home server. If the - # DNS server is slow or unresponsible, it means that - # FreeRADIUS will NOT be able to determine the IP - # address, and will therefore NOT start. - # - # hostname = localhost + # Note that while both ipaddr and ipv6addr will accept + # both addresses and host names, we do NOT recommend + # using host names. When you specify a host name, the + # server has to do a DNS lookup to find the IP address + # of the home server. If the DNS server is slow or + # unresponsive, it means that FreeRADIUS will NOT be + # able to determine the address, and will therefore NOT + # start. + # + # Also, the mapping of host name to address is done ONCE + # when the server starts. If DNS is later updated to + # change the address, FreeRADIUS will NOT discover that + # until after a re-start, or a HUP. # # The port to which packets are sent. diff --git a/src/main/realms.c b/src/main/realms.c index e61527c..fedaaa7 100644 --- a/src/main/realms.c +++ b/src/main/realms.c @@ -152,8 +152,6 @@ static CONF_PARSER home_server_config[] = { { "ipv6addr", PW_TYPE_IPV6ADDR, 0, &hs_ip6addr, NULL }, - { "hostname", PW_TYPE_STRING_PTR, - offsetof(home_server,hostname), NULL, NULL}, { "port", PW_TYPE_INTEGER, offsetof(home_server,port), NULL, "0" }, @@ -227,10 +225,10 @@ static int home_server_add(CONF_SECTION *cs, int type) memset(&hs_ip6addr, 0, sizeof(hs_ip6addr)); cf_section_parse(cs, home, home_server_config); - if (!home->hostname && (htonl(hs_ip4addr.s_addr) == INADDR_NONE) && + if ((htonl(hs_ip4addr.s_addr) == INADDR_NONE) && IN6_IS_ADDR_UNSPECIFIED(&hs_ip6addr)) { cf_log_err(cf_sectiontoitem(cs), - "No hostname, IPv4 address, or IPv6 address defined for home server %s.", + "No IPv4 or IPv6 address defined for home server %s.", name2); free(home); free(hs_type); @@ -241,10 +239,9 @@ static int home_server_add(CONF_SECTION *cs, int type) } /* - * FIXME: Parse home->hostname! + * Figure out which one to use. * - * Right now, only ipaddr && ip6addr are used. - * The old-style parsing still allows hostnames. + * FIXME: Set hostname to something? */ if (htonl(hs_ip4addr.s_addr) != INADDR_NONE) { home->ipaddr.af = AF_INET; @@ -256,7 +253,7 @@ static int home_server_add(CONF_SECTION *cs, int type) } else { cf_log_err(cf_sectiontoitem(cs), - "FIXME: parse hostname for home server %s.", + "Internal sanity check failed for home server %s.", name2); free(home); free(hs_type); -- 2.1.4