]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 1330] disallow interface/nic rules when --novirtualips or
authorDave Hart <hart@ntp.org>
Sun, 4 Oct 2009 20:28:52 +0000 (20:28 +0000)
committerDave Hart <hart@ntp.org>
Sun, 4 Oct 2009 20:28:52 +0000 (20:28 +0000)
  --interface are used.

bk: 4ac90584hBRN2bzJND1E29UgZcRV8g

ChangeLog
ntpd/ntp_config.c

index 20eaa53db23d90ede2378060a1aa849fe509a7e7..986ee9c8c9b8a2b0c5b7cb64ca1430fb4a326b26 100644 (file)
--- 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 <stenn@ntp.org>
-[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 <filename> option for future build-time
   testing of saveconfig fidelity.
index 806d38d9f4c43dab2a250cb8c37127012c7d2b40..84987b0de2167433e6c38fabe7d00b2887d26dda 100644 (file)
@@ -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)) {