]> git.proxmox.com Git - pve-cluster.git/commitdiff
fix bug #199: allow node names to start with numbers
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 22 May 2012 09:54:02 +0000 (11:54 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 22 May 2012 09:54:02 +0000 (11:54 +0200)
Makefile
data/src/memdb.c
debian/changelog

index c3b2d1b5117501207f3a8e22e0fa7a6bf6f53bff..2ca260d3c86bf1ea2609c1ba7114ed7118ce3adb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
-RELEASE=2.0
+RELEASE=2.1
 
 PACKAGE=pve-cluster
 PKGVER=1.0
-PKGREL=26
+PKGREL=27
 
 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 
index e3323bd33afccc6b0e3120b9bf3f3b36807b03ef..7a3ce83ba3a201995061421686746f5169f71e2c 100644 (file)
@@ -231,11 +231,16 @@ valid_nodename(
        /* LDH rule (letters, digits, hyphen) */
 
        int len = strlen(nodename);
+
+       if (len < 1) {
+               return FALSE;
+       }
+
        for (int i = 0; i < len; i ++) {
                char c = nodename[i];
                if ((c >= 'A' && c <= 'Z') ||
                    (c >= 'a' && c <= 'z') ||
-                   (i != 0 && c >= '0' && c <= '9') ||
+                   (c >= '0' && c <= '9') ||
                    (i != 0 && i != (len-1) && c == '-'))
                        continue;
                return FALSE;
index 0f7d7627f607672cf831295312a52b12592e20a2..173877ece73e60cf57c03f351928390d807b427d 100644 (file)
@@ -1,3 +1,9 @@
+pve-cluster (1.0-27) unstable; urgency=low
+
+  * fix bug #199: allow node names to start with numbers
+
+ -- Proxmox Support Team <support@proxmox.com>  Tue, 22 May 2012 11:53:02 +0200
+
 pve-cluster (1.0-26) unstable; urgency=low
 
   * new rrd format for node data (skip 2 entries).