iana_update:
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
rm -f port-numbers.tmp portslist.tmp
+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
- finished adjusting testset to provide qtype NS answers.
return NULL;
}
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;
}
/* create ip4 and ip6 ports so that return addresses are nice. */
static const char* ident="unbound";
#ifdef HAVE_SYSLOG_H
/** are we using syslog(3) to log to */
-static int log_to_syslog = 0;
+static int logging_to_syslog = 0;
#endif /* HAVE_SYSLOG_H */
/** time to print in log, if NULL, use time(2) */
static uint32_t* log_now = NULL;
}
if(logfile
#ifdef HAVE_SYSLOG_H
- || log_to_syslog
+ || logging_to_syslog
#endif
)
verbose(VERB_QUERY, "switching log to %s",
if(logfile && logfile != stderr)
fclose(logfile);
#ifdef HAVE_SYSLOG_H
- if(log_to_syslog) {
+ if(logging_to_syslog) {
closelog();
- log_to_syslog = 0;
+ logging_to_syslog = 0;
}
if(use_syslog) {
openlog(ident, 0, LOG_DAEMON);
- log_to_syslog = 1;
+ logging_to_syslog = 1;
return;
}
#endif /* HAVE_SYSLOG_H */
(void)pri;
vsnprintf(message, sizeof(message), format, args);
#ifdef HAVE_SYSLOG_H
- if(log_to_syslog) {
+ if(logging_to_syslog) {
syslog(pri, "[%d:%x] %s: %s",
(int)getpid(), tid?*tid:0, type, message);
return;