]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Accept uppercase letters in iproute2 names
authorOndrej Zajicek <santiago@crfreenet.org>
Tue, 22 Oct 2019 14:20:38 +0000 (16:20 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Tue, 22 Oct 2019 14:25:38 +0000 (16:25 +0200)
Names read from texfiles in /etc/iproute2/* are normalized by replacing
non-alphanumeric chars with underscore. The patch fixes handling of
uppercase letters, which were handled as non-alphanumberic.

Thanks to Igor Gavrilov for the bugreport.

sysdep/unix/main.c

index 282afae220d2cf0a77702dbf60769e108a21b54e..d9d9ad84c4ca3a1e47859b9abbfffcaff2b23998 100644 (file)
@@ -139,7 +139,7 @@ read_iproute_table(char *file, char *prefix, int max)
       continue;
 
     for(p = name; *p; p++)
-      if ((*p < 'a' || *p > 'z') && (*p < '0' || *p > '9') && (*p != '_'))
+      if ((*p < 'a' || *p > 'z') && (*p < 'A' || *p > 'Z') && (*p < '0' || *p > '9') && (*p != '_'))
        *p = '_';
 
     add_num_const(namebuf, val);