Allow use underscores and dots in service names without escaping.

PR:		234237
MFC after:	1 week
This commit is contained in:
ae 2018-12-21 10:41:45 +00:00
parent de7f82e077
commit f78efc9763

View File

@ -940,7 +940,8 @@ strtoport(char *s, char **end, int base, int proto)
/*
* find separator. '\\' escapes the next char.
*/
for (s1 = s; *s1 && (isalnum(*s1) || *s1 == '\\') ; s1++)
for (s1 = s; *s1 && (isalnum(*s1) || *s1 == '\\' ||
*s1 == '_' || *s1 == '.') ; s1++)
if (*s1 == '\\' && s1[1] != '\0')
s1++;