bug fixes 203, 204, 206.

git-svn-id: file:///svn/unbound/trunk@1186 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2008-08-13 07:11:42 +00:00
parent 1e4e8cb68a
commit 77b79fde5d
4 changed files with 14 additions and 8 deletions

View file

@ -297,7 +297,7 @@ download_ldns:
iana_update: iana_update:
curl -o port-numbers.tmp http://www.iana.org/assignments/port-numbers curl -o port-numbers.tmp http://www.iana.org/assignments/port-numbers
egrep -v "Unassigned|Reserved" port-numbers.tmp | awk '{ match($$0, "[0-9]+/udp"); if (RLENGTH > 0) print substr($$0, RSTART, RLENGTH - 4) ","}' | sort -nu > portslist.tmp awk '/Unassigned|Reserved/ {next;} { match($$0, "[0-9]+/udp"); if (RLENGTH > 0) print substr($$0, RSTART, RLENGTH - 4) ","}' port-numbers.tmp | sort -nu > portslist.tmp
cat portslist.tmp > util/iana_ports.inc cat portslist.tmp > util/iana_ports.inc
rm -f port-numbers.tmp portslist.tmp rm -f port-numbers.tmp portslist.tmp

View file

@ -1,3 +1,9 @@
13 August 2008: Wouter
- bug #203: nicer do-auto log message when user sets incompatible
options.
- bug #204: variable name ameliorated in log.c.
- bug #206: in iana_update, no egrep, but awk use.
12 August 2008: Wouter 12 August 2008: Wouter
- finished adjusting testset to provide qtype NS answers. - finished adjusting testset to provide qtype NS answers.

View file

@ -605,7 +605,7 @@ listening_ports_open(struct config_file* cfg)
return NULL; return NULL;
} }
if(do_auto && (!do_ip4 || !do_ip6)) { if(do_auto && (!do_ip4 || !do_ip6)) {
log_warn("interface_automatic option does not work when IP4 or IP6 is not enabled. Disabling option."); log_warn("interface_automatic option does not work when either do-ip4 or do-ip6 is not enabled. Disabling option.");
do_auto = 0; do_auto = 0;
} }
/* create ip4 and ip6 ports so that return addresses are nice. */ /* create ip4 and ip6 ports so that return addresses are nice. */

View file

@ -67,7 +67,7 @@ static ub_thread_key_t logkey;
static const char* ident="unbound"; static const char* ident="unbound";
#ifdef HAVE_SYSLOG_H #ifdef HAVE_SYSLOG_H
/** are we using syslog(3) to log to */ /** are we using syslog(3) to log to */
static int log_to_syslog = 0; static int logging_to_syslog = 0;
#endif /* HAVE_SYSLOG_H */ #endif /* HAVE_SYSLOG_H */
/** time to print in log, if NULL, use time(2) */ /** time to print in log, if NULL, use time(2) */
static uint32_t* log_now = NULL; static uint32_t* log_now = NULL;
@ -82,7 +82,7 @@ log_init(const char* filename, int use_syslog, const char* chrootdir)
} }
if(logfile if(logfile
#ifdef HAVE_SYSLOG_H #ifdef HAVE_SYSLOG_H
|| log_to_syslog || logging_to_syslog
#endif #endif
) )
verbose(VERB_QUERY, "switching log to %s", verbose(VERB_QUERY, "switching log to %s",
@ -90,13 +90,13 @@ log_init(const char* filename, int use_syslog, const char* chrootdir)
if(logfile && logfile != stderr) if(logfile && logfile != stderr)
fclose(logfile); fclose(logfile);
#ifdef HAVE_SYSLOG_H #ifdef HAVE_SYSLOG_H
if(log_to_syslog) { if(logging_to_syslog) {
closelog(); closelog();
log_to_syslog = 0; logging_to_syslog = 0;
} }
if(use_syslog) { if(use_syslog) {
openlog(ident, 0, LOG_DAEMON); openlog(ident, 0, LOG_DAEMON);
log_to_syslog = 1; logging_to_syslog = 1;
return; return;
} }
#endif /* HAVE_SYSLOG_H */ #endif /* HAVE_SYSLOG_H */
@ -147,7 +147,7 @@ log_vmsg(int pri, const char* type,
(void)pri; (void)pri;
vsnprintf(message, sizeof(message), format, args); vsnprintf(message, sizeof(message), format, args);
#ifdef HAVE_SYSLOG_H #ifdef HAVE_SYSLOG_H
if(log_to_syslog) { if(logging_to_syslog) {
syslog(pri, "[%d:%x] %s: %s", syslog(pri, "[%d:%x] %s: %s",
(int)getpid(), tid?*tid:0, type, message); (int)getpid(), tid?*tid:0, type, message);
return; return;