From: Dave Hart Date: Sun, 4 Oct 2009 20:28:52 +0000 (+0000) Subject: [Bug 1330] disallow interface/nic rules when --novirtualips or X-Git-Tag: NTP_4_2_5P227~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cdfbdf4bed59af3e1b942c55fc4ceee0f9248cd;p=thirdparty%2Fntp.git [Bug 1330] disallow interface/nic rules when --novirtualips or --interface are used. bk: 4ac90584hBRN2bzJND1E29UgZcRV8g --- diff --git a/ChangeLog b/ChangeLog index 20eaa53db..986ee9c8c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,9 @@ +* [Bug 1330] disallow interface/nic rules when --novirtualips or + --interface are used. * Add test of ntpd --saveconfigquit fidelity using new complete.conf. (4.2.5p226) 2009/10/04 Released by Harlan Stenn -[Bug 1318] Allow multiple -g options on ntpd command line. -[Bug 1327] ntpq, ntpdc, ntp-keygen -d and -D should work with configure +* [Bug 1318] Allow multiple -g options on ntpd command line. +* [Bug 1327] ntpq, ntpdc, ntp-keygen -d and -D should work with configure --disable-debugging. * Add ntpd --saveconfigquit option for future build-time testing of saveconfig fidelity. diff --git a/ntpd/ntp_config.c b/ntpd/ntp_config.c index 806d38d9f..84987b0de 100644 --- a/ntpd/ntp_config.c +++ b/ntpd/ntp_config.c @@ -2401,7 +2401,18 @@ config_nic_rules( char * pchSlash; int prefixlen; - for (curr_node = queue_head(ptree->nic_rules); + curr_node = queue_head(ptree->nic_rules); + + if (curr_node != NULL + && (HAVE_OPT( NOVIRTUALIPS ) || HAVE_OPT( INTERFACE ))) { + msyslog(LOG_ERR, + "interface/nic rules are not allowed with --interface (-I) or --novirtualips (-L)%s", + (input_from_file) ? ", exiting" : ""); + if (input_from_file) + exit(1); + } + + for (; curr_node != NULL; curr_node = next_node(curr_node)) {