commit d859ca2f9b480e79d715fc70d6aaaf45f0b221d3 Author: Kyle Mestery Date: Wed Jul 24 13:11:58 2013 +0100 Allow hostnames to start with a number. --- src/util.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/util.c b/src/util.c index af4031c..94cc570 100644 --- a/src/util.c +++ b/src/util.c @@ -151,14 +151,13 @@ int legal_hostname(char *name) /* check for legal char a-z A-Z 0-9 - _ . */ { if ((c >= 'A' && c <= 'Z') || - (c >= 'a' && c <= 'z')) + (c >= 'a' && c <= 'z') || + (c >= '0' && c <= '9')) continue; - if (!first && - ((c >= '0' && c <= '9') || - c == '-' || c == '_')) + if (!first && (c == '-' || c == '_')) continue; - + /* end of hostname part */ if (c == '.') return 1;