summaryrefslogtreecommitdiff
path: root/usr.sbin/sasyncd/conf.y
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/sasyncd/conf.y')
-rw-r--r--usr.sbin/sasyncd/conf.y7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/sasyncd/conf.y b/usr.sbin/sasyncd/conf.y
index 868063c1f5b..0b6731c19b5 100644
--- a/usr.sbin/sasyncd/conf.y
+++ b/usr.sbin/sasyncd/conf.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.y,v 1.19 2017/04/09 02:40:24 jsg Exp $ */
+/* $OpenBSD: conf.y,v 1.20 2019/03/21 10:55:41 otto Exp $ */
/*
* Copyright (c) 2005 Håkan Olsson. All rights reserved.
@@ -325,7 +325,7 @@ yylex(void)
/* Numerical token? */
if (isdigit(*confptr)) {
for (p = confptr; *p; p++)
- if (*p == '.') /* IP address, or bad input */
+ if (*p == '.' || *p == ':') /* IP address, or bad input */
goto is_string;
v = (int)strtol(confptr, (char **)NULL, 10);
yylval.val = v;
@@ -397,6 +397,9 @@ conf_parse_file(char *cfgfile)
if (*s == '#') {
while (*s != '\n' && s < buf + conflen)
s++;
+ while (*s == '\n' && s < buf + conflen)
+ s++;
+ s--;
continue;
}
if (d == buf && isspace(*s))