From: Harlan Stenn Date: Wed, 1 Jan 2014 08:25:27 +0000 (+0000) Subject: [Bug 2060] Warn about restrictions with "kod" but not "limited" X-Git-Tag: NTP_4_2_7P410~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3728e44c03813eb26b4ec3cfdcb9c2ccc335bd42;p=thirdparty%2Fntp.git [Bug 2060] Warn about restrictions with "kod" but not "limited" bk: 52c3d0f7pfLO_MZ1D8BLDW0VTj0sfQ --- diff --git a/ntpd/ntp_config.c b/ntpd/ntp_config.c index 3917254df..4ac3aa384 100644 --- a/ntpd/ntp_config.c +++ b/ntpd/ntp_config.c @@ -2457,10 +2457,15 @@ config_access( /* It would be swell if we could identify the line number */ if ((RES_KOD & flags) && !(RES_LIMITED & flags)) { + char *kod_where = (my_node->addr) + ? my_node->addr->address + : (mflags & RESM_SOURCE) + ? "source" + : "default"; char *kod_warn = "KOD does nothing without LIMITED."; - fprintf(stderr, "%s\n", kod_warn); - msyslog(LOG_WARNING, "%s", kod_warn); + fprintf(stderr, "restrict %s: %s\n", kod_where, kod_warn); + msyslog(LOG_WARNING, "restrict %s: %s", kod_where, kod_warn); } ZERO_SOCK(&addr);