extcap: Allow ASCII '0' in preference name
authorStig Bjørlykke <stig@bjorlykke.org>
Tue, 13 Nov 2018 18:05:50 +0000 (19:05 +0100)
committerStig Bjørlykke <stig@bjorlykke.org>
Tue, 13 Nov 2018 18:08:02 +0000 (18:08 +0000)
Update another regex to also allow '0' in the preference name.

Change-Id: I61e39a160d86195c989ab53623bc5887a10dcaad
Reviewed-on: https://code.wireshark.org/review/30606
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
extcap.c

index ed3288be7b7d09bb729470d70736df136527cf0e..8bab624eed258377d80099a265792ff671a43a6f 100644 (file)
--- a/extcap.c
+++ b/extcap.c
@@ -743,7 +743,7 @@ static gboolean cb_preference(extcap_callback_info_t cb_info)
         GList *walker = arguments;
 
         GRegex *regex_name = g_regex_new("[-]+", (GRegexCompileFlags) 0, (GRegexMatchFlags) 0, NULL);
-        GRegex *regex_ifname = g_regex_new("(?![a-zA-Z1-9_]).", (GRegexCompileFlags) 0, (GRegexMatchFlags) 0, NULL);
+        GRegex *regex_ifname = g_regex_new("(?![a-zA-Z0-9_]).", (GRegexCompileFlags) 0, (GRegexMatchFlags) 0, NULL);
         if (regex_name && regex_ifname)
         {
             while (walker != NULL)