]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 2561] Allow wildcards in the target of the "interface" command
authorHarlan Stenn <stenn@ntp.org>
Fri, 28 Feb 2014 09:20:55 +0000 (04:20 -0500)
committerHarlan Stenn <stenn@ntp.org>
Fri, 28 Feb 2014 09:20:55 +0000 (04:20 -0500)
bk: 531054f77B2WPisfNKHFejknv0l7dA

ntpd/ntp_io.c

index 10dd92527b153c003f51d627a1ddb8c9eba9cf7c..a59bb39666091bcf554758428d6433d330f598a1 100644 (file)
@@ -11,6 +11,9 @@
 #include <signal.h>
 #ifdef HAVE_FNMATCH_H
 # include <fnmatch.h>
+# if !defined(FNM_CASEFOLD) && defined(FNM_IGNORECASE)
+#  define FNM_CASEFOLD FNM_IGNORECASE
+# endif
 #endif
 #ifdef HAVE_SYS_PARAM_H
 # include <sys/param.h>
@@ -1359,7 +1362,7 @@ interface_action(
 
                case MATCH_IFNAME:
                        if (if_name != NULL
-#ifdef HAVE_FNMATCH
+#if defined(HAVE_FNMATCH) && defined(FNM_CASEFOLD)
                            && !fnmatch(rule->if_name, if_name, FNM_CASEFOLD)
 #else
                            && !strcasecmp(if_name, rule->if_name)